4 ms·
.NET is far beyond Java as a platform for building languages though, and it's been that way right from the start. Reified generics, value types, structs, unsign
by 0xbear 9y ago
.NET is far beyond Java as a platform for building languages though, and it's been that way right from the start. Reified generics, value types, structs, unsigned integer type support, intermediate language actually optimized for compilation. It's pretty nice.
For some reason Java people have a near allergic reaction to it though.
- pjmlp 9y agoSun had an allergic reaction to it. Oracle has improved it quite a bit and all those features are being worked on for Java 10.
- 0xbear 9y agoAnd they will be worked on for at least the next decade. Meanwhile .NET had them for 16 years now.
- pjmlp 9y agoMeanwhile .NET is only fully usable in Windows for many types of applications, because .NET Core and Mono don't support all the platforms that Java does and .NET Standard 2.0 does not yet cover APIs like WPF, Systems.Drawing, WCF, ADO.NET drivers for all relevant enterprise databases. So it is not like everything is better on the other side. Note that I do enjoy using both of them since their early versions.
- 0xbear 9y agoJava is not really usable anywhere for e.g. GUI, so there's that as well.
- pjmlp 9y agoAndroid, UNIX and embedded devices (Ricoh printers and medical devices, factory controls for exemple) prove otherwise. The only problema with Swing (JavaFX not so much) is developers coding away withouth bothering to learn how to use them. Yes, out of the box they are harder to use than Windows Forms, but anyone that bothers to read books like "Filthy Rich Clients" is able to tame Swing. When .NET Core starts supporting a standard GUI (eventually Xamarin.Forms) than runs in all platforms that Java GUIs run today, then you can complain.
- pkolaczk 9y agoReified generics are more of a problem than a solution for language creators. .NET generics are too weak to be the base for languages with really powerful type systems like Scala or Haskell. Therefore implementing Scala on .NET required to use erasure and turned out to be more complex than in Java, which supports erasure "natively".
- dtech 9y agoThey might make languages harder to implement, but on this point C# definitely wins over Java/Scala for programmers. I cringe a little when I need to write the occasional `def foo[T](list: List[T])(implicit tag: ClassTag[T])` in Scala.
- dtech 9y agoYep, the CLR/VM is a much better target for languages and C# fixes a lot of Java's mistakes. It's such a shame that Microsoft until recently kept it so tightly controlled and Windows only. If that hadn't been the case the ecosystem (libraries and languages) might have been a lot more up to par when compared to the JVM ecosystem.
- rbanffy 9y ago> kept it so tightly controlled and Windows only Make no mistake: Microsoft knows very well what its business model is. Sun was very confused in that respect.
- 0xbear 9y agoIt never was "Windows only": https://msdn.microsoft.com/en-us/library/cc749640.aspx https://msdn.microsoft.com/en-us/library/cc749640.aspx. Mono arrived shortly thereafter. And it had open spec right from the start. Patents were an issue though, there's no disagreement on that point.
- deong 9y agoMono was awesome for what it was, and I'm not trying to denigrate those early efforts, but what it was wasn't really enough to say .Net wasn't Windows only. It didn't support WinForms, so no GUI application built for Windows would work on Mono without a major rewrite. Performance was also pretty bad in my experience. We built an optimization engine while I was in grad school for a funding source that mandated Windows, so we wrote the application in C#/.Net. I would develop on Linux at the time, and I built a version of the application that had no GUI so it could run under Mono, but it was easily an order of magnitude slower. It kind of worked for a small slice of .Net programs (e.g., those that didn't rely on WinForms or any other non-implemented part of the stack). That's about all you could say for it for quite some time.
- cratermoon 9y agoMono was great for the kind of programs you would write in Python if you worked for a company that used any F/OSS under protest and held it at arms length when it couldn't avoid using it.
- rbanffy 9y agoNot sure how it is now, but the requirement to run Windows in order to be a first class citizen, as .NET required for most of its existence, is enough to give me an allergic reaction.
- holydude 9y agoI was the same. I lived only UNIX/Linux and knew where things were. In retrospect I can't even look into the mirror now on how wrong I was. Don't take me wrong I am not saying that Windows / MS stack is better. It's just as good! And that's the beauty of it. I am glad microsoft is embracing other platforms so lets see how other people will react :-)