Re:Why did Microsoft create C#? Wasn't Java good enough in t...
by DonHopkins on Sunday February 11, 2018 @01:46PM
(#16354061)
In the case of generics, C# got them right (but required changes to CLR 2.0) and then Java tried to copy the idea (without requiring any changes to the JVM) but fucked them up. Look up "type erasure": Java's underlying compiled classes weren't actually generic, and generics compiled down to "Object" and casts (which are less efficient, and can be subverted at runtime). Generics were implemented by the Java compiler, not the JVM runtime.
https://stackoverflow.com/questions/31693/what-are-the-diffe...
https://stackoverflow.com/questions/355060/c-sharp-vs-java-g...
http://www.jprl.com/Blog/archive/development/2007/Aug-31.htm...
http://www.artima.com/intv/generics2.html
https://blogs.msdn.microsoft.com/ericlippert/2009/07/30/what...
Re:Why did Microsoft create C#? Wasn't Java good enough in t...
by pjmlp on Monday February 12, 2018 @03:18AM
(#16357279)
The Pizza compiler had better generics support.
http://pizzacompiler.sourceforge.net/
But then only part of it was taken back into Java.
I always thought that prior to C# 1.0 being released, the Java language was stuck. There was no generics, annotations, enumerations, for/each loops or auto boxing which made programming in Java not only painful but dangerous (especially with the lack of generics and for/each). I personally, never considered anything before Java 1.5 "good enough".
I was always under the impression that these language change were in response to what C# and many of these language concepts were practically copied from C#. Is this actually the case?