Hacker News new | ask | show | jobs
by kwhitefoot 4399 days ago
For me the problem with .NET is not the libraries but the fact that the two principle languages (C# and VB) are so old fashioned. Hardly any of the useful stuff is part of the language, it's all in the libraries which means that.NET code is very verbose because there is no syntax for things like lists and dictionaries. The latest versions are getting better, at least you can create arrays using a compact syntax but dictionaries are still a pain. Both of them are essentially C without unmanaged pointers and the addition of a few slightly better types but still scalar types are special and cannot be treated as objects.

Also they aren't even usefully old-fashioned, why can't we have arrays where the first item is number 1, or 21 or some other number, Basic had that from the beginning. Why do I have to use a dictionary when I want to use an ordinal type such as a character or boolean as the index (Pascal could use any ordinal type as an array index). Why can't I create subtypes of the integers and reals (Pascal had that and it prevented large numbers of errors). Functional languages have implemented guard clauses, these can simplify your code dramatically and remove the need for a lot of traditional if and case statements. Bertrand Meyer integrated contracts into Eiffel almost thirty years ago, and now MS has provided them by means of a clunky add-on that rewrites your binary after it has been compiled.

And so on, it's not that .NET is bad, it's that after all that effort Anders Hejlsberg (yes, he of justified Turbo Pascal fame) should really have been able to produce something so much better, or at least more interesting.

Rant over, thanks for reading if you made it this far.