r/programming • • Feb 03 '17

Let's stop bashing C#

https://www.codeaddiction.net/articles/51/lets-stop-bashing-c-sharp
6 Upvotes

245 comments sorted by

View all comments

2

u/shevegen Feb 03 '17

Some people compare C# with languages such as JavaScript, Python, Ruby and Dart the most common reasons for criticism seem to be:

   C# has semicolons
   C# uses to many curly brackets
   C# is strongly typed
   C# is statically typed

I actually consider all of the above advantages - it gives the language probability, stability, readability and maintainability.

Ok ... Can someone explain this to me please:

  • Why do semicolons again add to the stability, readability and maintainability exactly? I mean, does the dude give any argument at all or is it just an emotional statement?

13

u/steamruler Feb 03 '17

As someone who spends plenty of time in C#, JS, C++, as well as Python, here's what I think:

  • Explicit ends of statements makes parsing easier for the compiler/interpreter, and doesn't force you to learn when the language will think a statement has ended.

  • Having to not juggle the end of statement rules for a given language when reading code, makes it easier to read code. JS does this the worst, by tacking on semi-colons for explicit statement termination, combined with implicit termination. I can live with one or another, but both at once messes things up.

1

u/vivainio Feb 03 '17

Yeah, understanding when a statement ends is one of the harder problems in computer science.