# why would someone learn c#?

C# is a beautiful built language and when i started programming in it i felt this language is a joy to write . because of how organized and well written .

but the problem is that i feel this language just came and set in the middle in a circle of different fields it doesn’t have a field that it shines on it . like yeah i want to pick c# for this field because its the best in it .

in desktop : why would you pick c# when there is c++ that outshine c# in every aspect (better performance ,better memory usage , can build every type of apps small medium to large, low level graphics etc… . and on top of that its portability like it works in every system ) .c# doesn’t provide anything better than c++ in this domain.

in mobile : why would you pick c# over java or swift when they are native languages that provide high performance and large tools to build any type of mobile apps .

in games : pick c# for games ? c++ also outshine c# in this domain you can build with c++ small to medium to large games with very high performance and efficient memory usage .

in web : c# doesn’t stand a chance against javascript with the huge frameworks and tools for both backend and frontend plus you can also work with java in the backend

so c++ is better than c# in desktop ,games and low level programming and performance related stuff

java is the best at android and on top of that you can also do web and desktop and more with it

javascript rules the web

yeah its general purpose language that can do a lot of things but in every field there is better alternatives .so why would someone pick this language ?

what’s your taught ?

2 Likes

Not only is C# cross platform, but it is also a quick to program language. It is far easier than C++ with very little losses.
You don’t always need the top performance (in fact, you rarely do), but rather need a quick to develop, easily readable, easily maintainable language and there is where C# shines.
It doesn’t shine on web? ASP.NET works very well and is better in every single aspect than node.js on the back end.
JavaScript is a front end language that was forced into back end - and, TBH, there it still has an extremely long way to go to compete with other backend languages.
Games: plenty games are made with Unity and C# and their performance is very good - again, not always the best possible performance is required.
Desktop apps: I tend to agree with your judgment on this one, as C# is far easier to develop and maintain than C# Mobile.

1 Like

You don’t always need the top performance

Amen. I get sick of the “better performance” pitch when the context doesn’t merit it. C# performs well, and well designed C# performs better than poorly designed C++ or C or Rust.

It is quite popular because of its memory safety, which you appear to be entirely ignoring, along with its pretty good performance. In any case, you will be utilizing a library that is probably built in C++ or CUDA for anything where performance is really important, like 3D rendering.
C# is actually particularly popular among game developers. Unity and Godot both support it, and many smaller developers use it for writing their own engines. It’s very popular due to its memory safety, which seems to be something you’re completely ignoring, plus relatively good performance, and for anything where performance is really critical (such as 3D rendering), you’ll be using a library that is probably written in C++ or CUDA anyway.

Write a million line desktop app in c# and c++ and then see which one is easier to maintain and saf- segfault (core dumped)

C# is actually particularly popular among game developers. Unity and Godot both support it, and many smaller developers use it for writing their own engines. It’s very popular due to its memory safety, which seems to be something you’re completely ignoring, plus relatively good performance, and for anything where performance is really critical (such as 3D rendering), you’ll be using a library that is probably written in C++ or CUDA anyway.
The two most popular public game engines are Unity (c#, independent scene) and Unreal (c++, console domination). This was somewhat hampered by Unity’s introduction of additional license requirements last year and the advent of Godot, but generally speaking, this is the majority of what C# is used for in the game industry. I’m not sure about web games, but I believe iOS also uses Java, though I could be mistaken.

For those with limited programming experience who wish to create games, C# has a straightforward syntax and doesn’t require as much setup as C++. These days, a lot of young people use Unity to create games.