Hacker News new | ask | show | jobs
by Salgat 506 days ago
C# was Microsoft's attempt to learn from Java's mistakes, which they very much succeeded at doing.
1 comments

That's not even remotely historic accurate. Sun vs Microsoft drove MS into creating C#.

Please don't fan boy to the point of lying.

It's much much more complicated than that. Sun refused to add many language features that Microsoft (then a cautious but also genuine user of Java) wanted. Such as refusal to add delegates/closures:

https://benhutchison.wordpress.com/2009/02/14/suns-rejection... https://stackoverflow.com/questions/1973579/why-doesnt-java-...

J++, which was Microsoft's Java implementation in the 90's added a few language extensions that were clearly not Sun-approved, but driven by internal engineering feedback at MS. C# having struct and class keywords, allowing you to define your own value types, is clearly a result of that missing in Java, which still in 2025 has no such equivalent yet.

Also Java's then native code interop solution, JNI, was and still remains complete garbage, and it's flaws were a huge guide for Microsoft when they deveoped .NET and it's native interop equivalent, PI (platform invoke).

Thankfully, Java now have FFM [foreign function and memory APIs](https://docs.oracle.com/en/java/javase/21/core/foreign-funct...) APIs (and also JNA which is community driven), which are much better than JNI.

The key point is that C# was happening regardless of whatever technical upsides people wanted to see out of it. C# would still exist today and still be just as popular in the Windows ecosystem even if it made all the same exact mistakes as Java.
That doesn't change that C# was designed with that philosophy in mind. The two statements aren't mutually exclusive.
> Please don't fan boy to the point of lying.

You made 5 replies negative about C# in this comment section alone.

As they say, haters are fans too :)

Where do you see 5 negative comments? Please link them?

Also why are you talking like cliquey high-school girl regarding a programming language. Complete with the emoji no less.

It's a tool, not a religion.