WizardStan said:
2001 - Anders Hejlsberg invents C# by removing a bunch of useless features from Java and cramming extra features in their place. C# is hailed as a great success.
Well, sadly, this is where it all went wrong, for you see, the creator of C# didn't remove anything from Java really, but instead added loads and loads of stuff: Some good things, like operator overriding/overloading, or structs, and some really, REALLY bad stuff (in the sense that "goto" is bad: useful, but can lead to really bad problems if used incorrectly) like:
- PInvoke (unportable and unsafe)
- "native { }" sections (can be used for hacks, are unportable, and introduce memory leaks)
- "lock() { }" sections (often lead to unexplainable deadlocks)
- Attributes (can cause unexpected behaviors and security issues)
- Unforced exception handling (If you allow a method to spit out any exception it likes, how the heck are you going to catch all of them? Especially if the framework you are using is closed-source... You're forced to use a "catch (Exception ex)" every time.)
- Global variables (we see which problems that brought us in C)
- The "goto" statement (yep, not kidding... Do I need to explain why this is bad?)
- LINQ (can be useful, but shouldn't have been done in syntax but instead as a library so as to make cleaner code)
- A very messy array creation system with multidimensional arrays and weird collection constructs ("Dictionary<int, string>[,][][,,] myDictionaryArray")
- An, in my opinion, too useless "foreach" system.
- A badly constructed GUI system (It's very difficult to get a Form to scale it's contents proportionally without using various Panel setups that consume memory ,and even then it's not what you want half of the time)
- A very incomplete API in some cases (Try scaling a System.Drawing.PointF by a factor, or try inheriting a System.Drawing.Brush; it could've been handled better...)
To create a language while trying to copy something like C# is doomed to fail.