Under the Hood with Java 10 Enhanced Generics
infoq.com
infoq.com
Still being crap in 2017, when the alternatives are good to great now, is dangerous, and Oracle's fear of alienating the masses of people who'll forever be two versions of Java behind is leaving the door open for Microsoft. I write games in C# in my free time, and between how great VS/R# is[1] and Microsoft supporting a CLR implementation I am inclined to trust more than Mono's on Linux and OS X, I'm excited at the prospect of being able to use .NET for server applications (no, no Windows Server for me, not now and not never) in the future.
[1] - IntelliJ comes close, but it does suffer, from a usability standpoint, from being cross-platform and having to compromise--I'd rather run a VM on my Mac to use VS than use IntelliJ, all things considered!
Unfortunately I did not understand the specific reasons he gave, but it had to do something with reification.
.NET is much less a threat to Java today than it were 10 years ago. Today Windows is no longer the dominant platform, you have Scala for people wanting more advanced language features, you have Android and web applications are in general preferred over desktop applications. And if you are writing desktop applications then you need to take into account the Mac platform where .NET is at best a second class citizen.
And when it comes to IDE: I find IntelliJ far better than VS from nearly every standpoint - I simply don't understand your last remark.
As far as the IDE's, I've used both and can say that I vastly prefer Visual Studio paired with ReSharper (the R# in the previous comment). This is the first comment I've seen in a public forum, actually, that says that VS is not better than IntelliJ.
As for .NET, if it were a viable Linux server side VM, C# would be a very compelling language in comparison to any of the JVM languages. It blows Java out of the water, and even as a full time Scala developer, I'd have a hard time arguing against it vs Scala because the things I love about Scala come with so many things I hate.
Wrt. the other things; the way I see it .NET-support outside Windows has been "vapourware" since .NET's inception. It simply has not happened. In the beginning I thought this was MS's deliberate strategy but now the tables have turned and as a sinister business strategy it does not make sense anymore.
I have no more love for Oracle than I have for MS and I would love to see something as solid, cross-platform and performant as the JVM from MS but it just is not there.
don't need to wait much longer; it's already faster than nodejs for trivial benchmarks and getting better every day.
On the other hand C# has even better generics than this proposal, along with await, dynamic, yield. And it's now supported by MS and Xamarin on all big platforms.
Consistency is important, but effectiveness is, by my lights, moreso. Java's biggest problem isn't the language, which is sad, but its type system, and I've yet to see a newer alternative JVM language with a type system remotely worth discussing. (Which isn't to say it doesn't exist, but it sure isn't Ceylon or Kotlin.)
Omitting dots and parens is so superficial that you could change the code purely mechanically to your preferred style. Just like running an autoformatter on someone's code before reading it because you don't like their indentation style.
Could you give an example of what you consider a more consistent JVM language? I find Scala is often more consistent, because it uses a small number of powerful features. E.g. Kotlin doesn't have Scala's implicits - so it instead has a bunch of different special-case features (e.g. extension methods) to replicate their use cases.
I can't say I've followed Kotlin all that closely, but it struck me as a less dense language. Ceylon is a language I've followed closely, and I find it very consistent.
The consensus among the more knowledgeable Scala programmers at my office is that IntelliJ is too quirky as an IDE (probably due to its built-in Scala compiler which gives way too many faux compile errors. This is maddening in a statically checked language!), and Eclipse-based Scala IDE is only slightly better. They recommend entirely disabling incremental compilation in the IDE, and instead using SBT for this. Coincidentally, this is what someone here on HN told me is the "unofficial recommendation" from the Typesafe guys -- I wouldn't know. As another example of broken tools, with Scala IDE refactoring is so fundamentally broken I cannot use it; it often results in wrong code (with Kepler-based Scala IDE, I've tried refactoring the name of a method and it resulted in syntax errors in other files!). Debugging is also hit-and-miss, at least with Scala IDE.
This is miles away from most Java IDEs, which are perfect in this regard. Not having compile errors correctly reported as you type is truly disappointing. Not being able to reliable refactor or debug code is very frustrating.
(I realize this is a tooling problem, and I love Scala. I'm just puzzled that almost nobody seems to consider these issues as disappointing as I do).
The only thing I can think of is that I only use imported SBT or Maven projects. Maybe that has something to do with it?
IntelliJ is OK for most Scala code, but it regularly makes a mess of anything complicated. So much so that, in our office, the first answer to "why doesn't this code compile" is "Does it really not compile, or is IntelliJ being dumb again?" It's usually the latter.
I think it depends on what style of Scala you use. Anything involving slick or spray tends to confuse IntelliJ. Its better in 14, but it's still not good.
The refactoring is bad enough that I hardly ever bother using it. It gets simple things mostly right, but doing that by hand is just as easy. It can't do the more useful things like method signature changes.
The tooling support for Scala is improving, but its at about 10 years behind Java tooling.
About all I find myself using refactoring tools with for Java is renaming, honestly, so I guess I'm more likely to have my itches scratched by the current state of tooling.
Thanks for the explanation, though!
Every day I find myself asking if the language is worth the terrible tooling story, and so far the language keeps winning out. But I completely understand people who don't come down on the same side as I do on this issue.
That said, the complaints about Scala's complexity are not overblown in the least. If you ever had the opportunity to move from one Scala team to another, or to integrate 2 Scala teams that had grown independently previously, you see that even saying you are a Scala team does not narrow down significantly what to expect when opening up the code base. There is so much variance in what is and is not idiomatic Scala, that even the Scala standard libraries are a mix of styles and best practices. As for Scala steering you towards the "Right Thing", I'd argue that the Scala community has not settled on what that is (to the point of schism) and my experience indicates that quite the opposite is true.
As far as IDEA achieving parity with Java, the very concept is laughable. Simple things like safe refactorings aren't, and syntax highlighting mistakes and phantom compile errors are common. While the IDE story in Scala has improved dramatically over the years, to say it is Java level is over selling it.
I only worked in a small team so far (3 devs) and had a good experience introducing Scala, but I can imagine that with people who have previous Scala experience and "their own style" can be problematic.
Added to this is that "best practices" have migrated pretty significantly over time, and things that many people thought of as very beneficial are now often seen as problematic (xml support, mixins, large for comprehensions, implicit conversions, etc) but not everyone agrees on these.
Compounding all of this is that the Scala "defaults" can lead to some pretty heinous problems and experienced Scala developers often have opinions that seem to directly contradict what Typesafe is selling (for instance, Akka, Play, the collections library, sbt etc. are all subject of ire for lots of people who have used them extensively).
What neither Scala nor those languages have is support for value types (structs) at the JVM level. Generics over primitives and value types is a natural consequence of the introduction of value types to the JVM.