Hacker News new | ask | show | jobs
by kernal 506 days ago
And Microsoft should have just used Java.
5 comments

They did. They called in J++ and gave it extensions, leading to a schooyard scuffle with Sun. When the school principal said Sun were right, they went off sulking and made Dot Net.
Microsoft had an underlying operating system that they wanted to rewrite substantially in C# on the .NET VM. They had a decent motivation for not having a core piece of Windows dependent on a product from another vendor that was competing in some of the same markets as their core product.

Google by contrast isn't nearly as invested in Dart as Microsoft was (and still is) in C#/.NET. Perhaps a better objection is that they should have just used Go — or a Go-binary-compatible language built on some of the same toolchain. (See also: Vala and Guile still don't play nice together as well as they should for two languages from the same project.)

Genuine question, is this comparison really apples to apples? Microsoft wanted to compete with sun right? Does google want to compete with programming languages like this? My gut tells me this is NIH not wanting to compete.
It is apples to apples.

Microsoft didn't want to compete with Sun so much as have an application development language with a garbage collector that wasn't owned by Sun.

You don't make much money off programming languages inherently.

This also elides an obvious riposte (so you mean they should have just used Mono? how did all that work out?) and a metric ton of differences between what C# targets and what Dart targets.

MS wanted to fracture the Java ecosystem. The Microsoft Java VM was an attempt to lockin developers to MS Java and not sun Java. They created J# and C# because of the sun lawsuit they lost.

They still wanted a Java like ecosystem but they would be sure it only ran on Windows servers.

MS spent years being hostile to open source software. It's only in about the past decade that they've turned a corner.

Here's a famous email from Bill Gates about Java and how to stop it.

https://web.archive.org/web/20220630223035/https://www.teche...

Unrelated to the discussion, but wow, the Nathan Myhrvold email seems prescient on so many levels.
C# was Microsoft's attempt to learn from Java's mistakes, which they very much succeeded at doing.
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.

And Java should have just been C++ with a really nice garbage collector
And C++ should have just been Objective-C with saner invocation syntax.
And Objective-C should have just been Smalltalk without the C baggage

(is this the root NIH syndrome?! I'm guessing no, I'm only 36. maybe LISP enters the picture here?)