News for hackers. Stuff that matters.
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.

Re:Why did Microsoft create C#? Wasn't Java good enough in t... by stmw on Sunday February 11, 2018 @04:02PM (#16354783)
I am glad you're pointing this out, because the limitations of the JVM are often overlooked as a big reason for why "we can't have nice things" in Java.