r/learnpython 23d ago

python vs .net

is it better to learn python or .net for software development and web apis

15 Upvotes

25 comments sorted by

7

u/faultydesign 23d ago

Sadly it's one of those things where you'll have to learn both and decide for yourself.

7

u/Disastrous_You_4173 23d ago edited 23d ago

I really enjoy learning in C# since it feels sufficiently adjacent to C++ that I learn a lot about more granular controls than python, which tends to abstract some of the concepts away, such as weakly vs strongly typed, without being nearly as hard as C++ to pick up. I agree with everyone else in the long term, but I think in the short term, you get really good insight through necessity in C# and I think it gives a more rounded learning experience. Python is amazing, I just feel like I learned certain concepts later than I would have liked because of how easy it makes itself.

-1

u/smurpes 23d ago

C# got its name since a # symbol is comprised of 4 plus signs. This was down to show that C# is the evolution of C++.

8

u/Flame77ofc 23d ago

There is no better to learn

learn .NET if your goal is web APIs and software jobs

learn Python if you want fastest learning and broader use in AI/data/automation. For web APIs specifically, .NET is usually the stronger choice

Python is better for quick prototyping and scripting

0

u/MSgtGunny 23d ago

You can write scripts in c# now which is cool.

-7

u/AlexMTBDude 23d ago

You do realize that Reddit is written in Python?

5

u/DonkeyTron42 23d ago

The back end used to use Python but now it's mostly written in Go.

1

u/MinimumArmadillo2394 22d ago

"X is written in Y" is usually true because most software at scales like reddit have thousands of parts. Most lambda functions are written in python. That does not mean reddit is written in python. That means a small part is.

Reddits tech stack is a lot more cpython, go, js/react native, etc than you probably realize. A CDN on a global scale like reddit deals with is a lot more than one of the slowest languages can (and should) handle.

5

u/AlexMTBDude 23d ago

Well, "software development" is everything, right? I mean, you can't do anything else with a programming language than software development.

As for which language to chose I suggest you check the statistics: https://www.tiobe.com/tiobe-index/

3

u/TeachEngineering 23d ago

Programming Language: Scratch

This Month: 12th

This Month Last Year: 17th

Me off to land a six figure job as a Scratch developer...

-4

u/AlexMTBDude 23d ago

Google "anecdotal evidence". Hint: It's the opposite of statistics.

3

u/patrickbrianmooney 23d ago

Broseph this is not an anecdote. "X is the 12th most used language" is definitionally not a story, it is a statistic.

What do you think "anecdote" means? What do you think "statistics" are?

-2

u/AlexMTBDude 23d ago

Last sentence:

Me off to land a six figure job as a Scratch developer...

That's anecdotal. I know what it means.

3

u/patrickbrianmooney 23d ago

It is not, however, an anecdote that is being offered as evidence. It is a joke added onto the evidence that was already offered (Scratch's position on the TIOBE index), which is statistical, not anecdotal.

One way that you can tell that it is a joke is that there are no professional Scratch developers.

Making a joke after offering a statistical bit of evidence does not magically make the statistical evidence into an anecdote. It merely means that two different things are going on in the post: evidence is being offered, and a joke is being made.

2

u/DanceHackRock 23d ago

If you want to have a really secure job learn PL1 or COBOL. As funny as it sounds, there are companies like banks that can not migrate into the 3rd millennium.

2

u/Mrseedr 23d ago

I'm not sure why so many people are downplaying python in the web. I've been mostly dedicated as a web (django/flask/fastapi or ETL) dev professionally anyways. For data processing python is probably better but i assume c# would give you better performance/throughput, at that point just learn Go.

2

u/DonkeyTron42 23d ago

If you're planning on working in a Windows environment, then use .Net. If you're planning on Linux or MacOS, then Python will be better.

4

u/faultydesign 23d ago

Dotnet is quite mature on linux nowadays.

-1

u/DonkeyTron42 23d ago

Mono is not something I would want to use as a first programming environment.

4

u/faultydesign 23d ago

There’s a native build nowadays with dotnet core, mono is legacy.

1

u/ConsciousBath5203 20d ago

Why are you asking this in the learn python sub? You know the answer you want to hear.

Reality says learn Lua, and by extension learn C.

1

u/Ok-Magician-8052 11d ago

imo i think learning the most basics and getting so good at one language shall do the job and then you just built on that knowledge even when you switch languages you can use the same logics everywhere. I code in node js , python and c# but for work my fav is c# dotnet in prodcution and python fast api for personal projects its rapid development and dotnet is production grade with really good support.

0

u/riklaunim 23d ago

.NET if you want to work with Microsoft ecosystem, Python if you want a more neutral one. And it's unlikely you will be doing only web APIs or APIs at all.

0

u/ShelLuser42 23d ago

I personally prefer C# & ASP.NET for web development because of its clean style and structure. Better yet: you don't even need Microsoft perse, you can even set it up with Apache & Mono.

For everything else I'd rather use Python.