Created
January 16, 2014 13:07
-
-
Save soc/8454725 to your computer and use it in GitHub Desktop.
My experience with C#
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I did a small project in C# recently, and I basically assumed | |
that coming from Scala I could enjoy all the benefits of a | |
(more) mainstream language and a polished, integrated | |
ecosystem. | |
Boy was I wrong. | |
My experience starts with installing Microsoft's latest Visual | |
Studio 2013 Express Desktop IDE which went really smooth. | |
But when working on my project, this is what I found: | |
- The documentation of the standard library is shockingly bad. | |
The documentation of many classes and methods consists of | |
not much more than the conversion of the name into a | |
complete sentence. | |
In a case where a method was overloaded with two variants | |
taking additional boolean options it would have been nice to | |
know what the default options are when calling the variation | |
of the method without parameters. | |
- There are often confusing variations within the same API on | |
how to do the same thing. Due to the lack of documentation, | |
it's just not possible to determine whether way A is just a | |
convenient factory around way B, or if there are substantial | |
differences. | |
- The source code of the standard library is not available by | |
default. It's kind of embarrassing that jumping to the | |
declaration (who the hell put that on F12?) just reveals | |
stubs. There seem to be ways around it | |
(referencesource.microsoft.com), but that is mostly targeted | |
at allowing people to debug code. | |
Both issues mentioned earlier wouldn't have been nearly that | |
bad if it had been possible to just read the implementation. | |
- The existence of both properties and methods in C# is kind | |
of terrible. There seems to be no consistent style applied | |
throughout the standard library, so one is usually guessing | |
whether to add parentheses or not. | |
- Visual Studio is pretty mediocre. It gets easily confused | |
by syntax errors and keeps pointing to the "wrong" wrong | |
place. Additionally, the auto-completion is only semi- | |
helpful most of the time. Now I know why most people recom- | |
mend installing Resharper. | |
- The compiler emits really bad error messages. In one case, | |
I got not one, but three not really helpful error messages | |
caused by forgetting to add the parentheses to a method. | |
Conclusion: | |
I'm positively surprised that Scala is doing much better in | |
all the points mentioned above. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment