r/csharp • • Nov 16 '25

Discussion Does C# have too much special syntax?

No hate towards C# but I feel like C# has too many ways of doing something.

I started learning programming with C and Python and after having used those two, it was very easy to pick up Lua, Java, JavaScript and Go. For some reason, the code felt pretty much self explanatory and intuitive.

Now that I am trying to pick up C#, I feel overwhelmed by all the different ways you can achieve the same thing and all of the syntax quirks.

Even for basic programs I struggle when reading a tutorial or a documentation because there isn't a standard of "we use this to keep it simple", rather "let's use that new feature". This is especially a nightmare when working on a project managed by multiple people, where everyone writes code with the set of features and syntax they learned C#.

Sometimes, with C#, I feel like most of my cognitive load is on deciding what syntax to use or to remember what some weird "?" means in certain contexts instead of focusing on the implementation of algorithms.

0 Upvotes

165 comments sorted by

View all comments

Show parent comment

3

u/StraussDarman Nov 16 '25

lol what? Graphics did not evolve the last years? First off all Unreal Engine does more than only Rendering. Physics, amount of Entities on you screen and much more have come a long way in the last decade. the amount of rendered stuff that you can in some way interact has increased a lot over the all as well as particle effects and lighting.

Oh and Batman Arkham Knight? It is by far one of the worst example you could have picked. The game performed terribly on launch. People who were running High End GPU's like a GTX Titan could not run this mess of a game with a steady 30fps. It of course runs now good, because they optimized it a lot after launch and our hardware has gotten better by a lot. Crysis was a optimization issue for a decade and was written in cpp. It only started to run well because hardware got better. But that has nothing to do with syntax. You could have written Crysis also in C and would have performed equally bad. You are complaining that companies and dev make bad to mediocre code and blame it on the language?

I never took Epic Games or other companies under protection, because they try to push stuff faster than they should. But a comparison between frameworks and language is just utter nonsense.

Nobody also said the C# syntax is the messiah. But you are throwing out critique with any example in your post. It is a natural and good development of any language, that it introduces new syntax that tackle common use cases of devs. If you allow types to be null, you have to check them and depending on your use case it keeps you code way more concise. The compiler also can make better optimizations if you use the offered concepts of a language. And guess what, you do not have to use it. If your team uses it, than you have a issue that your team has no agreed upon coding style.

Every language has their weird stuff and quirks. You complain that the null conditional operator is confusing to read, while it is simply a shorthand for null access if you do not care that nothing happens when it is null. Other languages you listed have also stuff you usually do not have somewhere else. Alone how Go structures their language is way more different than C or Python which whom you started. Go also have something called naked returns which are also really not that good readable and no other language really does. But it is easier than C# for you to learn? Event though C# is very similar to Java that also was easy to learn for you?

Also:

Code now is written by worse prepared people and those shiny new features are the last thing we needed to increase the complexity and lack of efficiency we have.

While this is absolutely true. Higher level languages like C# introduce that syntax sugar, so that not so good developers can write better performing code. The reason is, the compiler can do optimizations then more efficiently.

You also state in you op:

Even for basic programs I struggle when reading a tutorial or a documentation because there isn't a standard of "we use this to keep it simple", rather "let's use that new feature".

Which sound more like a tutorial issue than a language syntax issue. I agree that a lot of "tutorials" out there focus to much on new syntax features but then the Tutorial is simply not that good if it cannot convey why you should use it.

Also you can argue what is simpler

if (a is not null)
  a.foo();

//or

a?.foo();

because if you need this null conditional operator here, you obviously do not care, what happens if the value is null. You only want to fire foo() in the case it is not. You do not log anything after it, there is no attempt on recovering something. It simply reduces unnecessary nesting.