4 ms·
The real history of C# is that it is a rip off of Java. Anders / Microsoft understandably doesn't want to acknowledge that, but the rest of us can. C# today has
by lateforwork 8mo ago
The real history of C# is that it is a rip off of Java. Anders / Microsoft understandably doesn't want to acknowledge that, but the rest of us can. C# today has diverged from Java, but the original release was Java with a few features added, such as properties, delegates, structs and unchecked exceptions.
That last one was a mistake, see https://mckoder.medium.com/the-achilles-heel-of-c-why-its-exception-handling-falls-short-f7f932488aba https://mckoder.medium.com/the-achilles-heel-of-c-why-its-ex...
- jolux 8mo agoChecked exceptions are bad because people just catch them and rethrow RuntimeException. Proper errors as data would be much preferable.
- lateforwork 8mo ago> people just catch them and rethrow People don't have to. There is a lot of misinformation out there about checked exceptions, and people are responding to the misinformation.
- vips7L 8mo agoChecked exceptions are proper errors as data. There is no difference between Result[T, E] and T throws E. The same people that just rethrow as RuntimeException would call unwrap() on Result and panic. The main problem with _Java_'s implementation of checked exceptions is that they're not fully in the type system because of Java's weak type system. That is solvable with a strong type system though, like in Scala or Swift.
- bigstrat2003 8mo agoYou can misuse the errors as data paradigm just like you can misuse checked exceptions. That doesn't make either paradigm bad, it makes the programmers who misuse them bad.
- HumblyTossed 8mo agoMS poached him (and was even sued for it - that's how egregious it was) to create a Java killer because they had issues with Java.
- jodrellblank 8mo ago> "Hejlsberg: First of all, C# is not a Java clone. ... we looked at lots of languages, we looked at Java" - https://web.archive.org/web/20100109195800/http://windowsdevcenter.com/pub/a/oreilly/windows/news/hejlsberg_0800.html https://web.archive.org/web/20100109195800/http://windowsdev... You can just state the author of the language is lying and you somehow know better. You don't even justify why "they don't want to acknoweldge it" - even with Hejlsberg there acknowledging taking ideas from Java - or explain why C# had those differences mentioned in the rest of that interview, or why Microsoft separately wrote their own Java implementation like Visual J++ if C# was just "their Java".
- equasar 8mo agoCompletely agree, HN is mostly anti .NET/C#. It rarely gains attraction, and when it does, people bashes it with unfounded or very outdated info from another era.
- jvfjllkttg 8mo agoWrong! J# was Microsoft’s Java.
- jodrellblank 8mo ago"Visual J++ is Microsoft's discontinued implementation of Java" - https://en.wikipedia.org/wiki/Visual_J%2B%2B https://en.wikipedia.org/wiki/Visual_J%2B%2B "J# does not compile Java-language source code to Java bytecode .. does not support Java applet development or the ability to host applets directly in a web browser" - https://en.wikipedia.org/wiki/Visual_J_Sharp https://en.wikipedia.org/wiki/Visual_J_Sharp
- deleted 8mo ago[deleted]
- hvb2 8mo agoHe literally says they're standing on the shoulders of Giants. And, you would be stupid not to look at other languages. How can you expect anything to be a clean slate to begin with? Is every oop language a rip off then? Products don't get designed in a vacuum
- lateforwork 8mo ago> He literally says they're standing on the shoulders of Giants. Yeah everyone says that. He should have called out one giant specifically: James Gosling. > And, you would be stupid not to look at other languages. Of course. Is that really what happened here? This was a literal clone. (And it is not like Microsoft never copies competitors' products.) Yes, they did add a few features.
- queenkjuul 8mo agoI recently wrote a project in C# 2.0 and i actually had the opposite conclusion; the inspiration from Java is clearly there but even by 2.0 it had diverged pretty meaningfully
- lateforwork 8mo agoYes the languages have diverged, especially the ecosystems. For big data projects Java/JVM languages are preferred. For many open source projects too, Java is preferred because C# was late to the OSS party. But for many enterprise web applications ASP.NET works well.
- codeulike 8mo agoI was around in that era and yes when C# came out it was very obvious that Microsoft had been 'inspired' by the Java syntax ... Java had been the buzzword for the 5 years or so beforehand, like the only language that anyone talked about, so when Microsoft came up with C# it was glaringly obvious where they got the idea from. On the other hand Java came with the VM ("write once run anywhere" as they used to say) but C# turned that inside out with the Common Langauge Runtime, so you had various languages like C# and VB.Net that compiled to the same bytecode. The other innovation with Java back in the day was that it came with a huge library/framework of classes that did most of the stuff you would need to do. Similarly Microsoft's .NET library was a copy of that idea, although the frameworks themselves were pretty different.
- qingcharles 8mo agoThey're also sweeping VB.NET under the rug. If I had to bet, I would guess VB.NET was the more popular .NET language at first. Everyone I know was converting all their ASP pages and VB apps to VB.NET. I didn't switch from VB.NET to C# as my main language until 2021. (the 90s was all C/C++/Java for me)