Hacker News new | ask | show | jobs
by wbl 1250 days ago
If it was just a matter of avoiding memory safety Java and ML were right there, and these languages are pretty different from each other.

It's not just memory safety. Go gets motivated by highly concurrent systems with large numbers of programmers and prioritized simplicity and developer experience. Rust was aiming at very high performance at the extended of complexity and compile times, and Swift wanted to build UI hierarchies.

2 comments

ML is still right there, and yet people are adding its features to more popular languages (recently Java). OCaml had a compiler to JS released in 2010 (js_of_ocaml), yet Typescript was still released 2 years later. Is this because of technical concerns? NIH syndrome? Lack of knowledge about absolutely everything that has been done? A need for control? Probably a bit of each, and other things too.
Java made the mistake of being VM based, no value types, and AOT only available via expensive 3rd party plugins.

Had Java been like Modula-3 or Eiffel since version 1.0, Go might never have happened at all.

Thankfully they are on the right path to fix those issues.

So Microsoft created C# to address that
No it didn't, it created C# because they got sued by Sun due to the J++ extensions, none of them were related to value types and AOT.

J++ extended Java in having a Windows specific framework JFC, Java Foundation Classes, what later became Windows Forms.

Support for events and J/Direct, which is basically how P/Invoke came to be on C#.

.NET has always supported a basic kind of AOT via NGEN, which only supports dynamic linking, AOT has to be done at install time, requires strong named Assemblies and it is tailored for fast startup leaving the rest of the work to the JIT.

If it wasn't for the lawsuit, C# would never happened, in fact the research being done with COM vNext used J++.

The biggest issue with C# is that the only real implementation was closed source and Windows-only until recently.

Additionally, AOT is still experimental, and doesn't support ASP.Net Core yet.