Live data from Hacker News

Under the Hood with Java 10 Enhanced Generics

infoq.com

11–20 of 45 posts

Re: Under the Hood with Java 10 Enhanced Generics

#11
post #4

This is really troubling to me. I'm a Scala developer and JVM nerd by trade (though more devops and high-level architecture as of late) and I've been hoping really hard that they'd just bite the bullet, flag-day the current type erasure and non-unified type system, and make Java 10 what...well, what the CLR is, now, today. The generic specialization route they describe is at best gross, isn't much better than what Sc…

There are a lot of problems with reification. It's a real strait-jacket. It would kill the JVM as a platform for Clojure and Ruby and kill some of the advanced parts of Scala.

Re: Under the Hood with Java 10 Enhanced Generics

#12
post #11
post #4

This is really troubling to me. I'm a Scala developer and JVM nerd by trade (though more devops and high-level architecture as of late) and I've been hoping really hard that they'd just bite the bullet, flag-day the current type erasure and non-unified type system, and make Java 10 what...well, what the CLR is, now, today. The generic specialization route they describe is at best gross, isn't much better than what Sc…

There are a lot of problems with reification. It's a real strait-jacket. It would kill the JVM as a platform for Clojure and Ruby and kill some of the advanced parts of Scala.

Interesting! Could you expand on that or direct me to some good links on the subject?

Re: Under the Hood with Java 10 Enhanced Generics

#14
post #7

Earlier quoted context omitted.

Yeah, but then it has also around 10K other features, most of which you don't need. Most Java developers won't be able to become Scala masters by 2018 anyway, if at all. 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.

I like C#, I write a lot of it, but the claims of complexity regarding Scala are just so vastly overblown. Anyone who's a competent Java programmer and has an open mind (which is the nicest way I can think of to say "doesn't pee themselves when they see a lambda") can be a competent Scala programmer within a month of daily use. It's not that hard, the tooling today in IDEA is roughly Java-level in terms of quality, a…

I like Scala (and I'm starting to use it in my day job!) but I don't really think IDEA tooling is "roughly Java-level" quality. In fact, all the Scala IDEs I've tried are astonishingly bad, IntelliJ included.

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).

Re: Under the Hood with Java 10 Enhanced Generics

#15
post #14
post #7

Earlier quoted context omitted.

I like C#, I write a lot of it, but the claims of complexity regarding Scala are just so vastly overblown. Anyone who's a competent Java programmer and has an open mind (which is the nicest way I can think of to say "doesn't pee themselves when they see a lambda") can be a competent Scala programmer within a month of daily use. It's not that hard, the tooling today in IDEA is roughly Java-level in terms of quality, a…

I like Scala (and I'm starting to use it in my day job!) but I don't really think IDEA tooling is "roughly Java-level" quality. In fact, all the Scala IDEs I've tried are astonishingly bad, IntelliJ included. 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…

Maybe you're using different Java knobs than I am, but IDEA 13 (haven't bought 14 yet) is effectively the same for me between Java and Scala. The Scala environment is perceptibly slower if I pay attention to it, but not that much and is generally unnoticeable. I can't remember the last time I had a bogus compiler error.

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?

Re: Under the Hood with Java 10 Enhanced Generics

#16
post #11
post #4

This is really troubling to me. I'm a Scala developer and JVM nerd by trade (though more devops and high-level architecture as of late) and I've been hoping really hard that they'd just bite the bullet, flag-day the current type erasure and non-unified type system, and make Java 10 what...well, what the CLR is, now, today. The generic specialization route they describe is at best gross, isn't much better than what Sc…

There are a lot of problems with reification. It's a real strait-jacket. It would kill the JVM as a platform for Clojure and Ruby and kill some of the advanced parts of Scala.

I'd be interested in what parts of Scala that an intelligent implementation of reification would harm.

Re: Under the Hood with Java 10 Enhanced Generics

#17
post #10

Earlier quoted context omitted.

I disagree. I think Scala suffers from Perlisms like being too succinct and more than one way of doing things (ex omitting dots and parens to invoke a method). There are newer alternative JVM languages that are more consistent and preferable to Java, so I disagree with your argument that those of us that prefer not to use Scala are Luddites.

Omitting dots and parens is superficial; it's no more a Perlism than allowing whitespace or extra parens (which almost all languages do). 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.…

I disagree about the dots and parents. It impacts readability because the person reading the code, which most developers do 90% to 95%. If different developers on the team use different styles, it makes reasoning about the cod that much more difficult.

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.

Re: Under the Hood with Java 10 Enhanced Generics

#18
post #9

Earlier quoted context omitted.

I disagree. I think Scala suffers from Perlisms like being too succinct and more than one way of doing things (ex omitting dots and parens to invoke a method). There are newer alternative JVM languages that are more consistent and preferable to Java, so I disagree with your argument that those of us that prefer not to use Scala are Luddites.

Meh? B&D languages bother me, for the most part--your criticisms would apply to C++, which I'm also happy to use. I mean, omitting dots and parens is primarily of value in flexible DSLs. Otherwise? Talk like adults and figure out the idioms you wish you adopt. Does one of your developers do something that you don't like. Then y'all talk it out. Not hard. Consistency is important, but effectiveness is, by my lights, m…

What's wrong with Ceylon's type system? I find it incredibly well designed. For instance, the Ceylon compiler won't allow you to assign null to a non-optional variable. Also, there is a bottom type, which makes controvariance far more manageable. I could go on.

Re: Under the Hood with Java 10 Enhanced Generics

#19
post #10

Earlier quoted context omitted.

I disagree. I think Scala suffers from Perlisms like being too succinct and more than one way of doing things (ex omitting dots and parens to invoke a method). There are newer alternative JVM languages that are more consistent and preferable to Java, so I disagree with your argument that those of us that prefer not to use Scala are Luddites.

Omitting dots and parens is superficial; it's no more a Perlism than allowing whitespace or extra parens (which almost all languages do). 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.…

[deleted]

Re: Under the Hood with Java 10 Enhanced Generics

#20
post #9

Earlier quoted context omitted.

I disagree. I think Scala suffers from Perlisms like being too succinct and more than one way of doing things (ex omitting dots and parens to invoke a method). There are newer alternative JVM languages that are more consistent and preferable to Java, so I disagree with your argument that those of us that prefer not to use Scala are Luddites.

Meh? B&D languages bother me, for the most part--your criticisms would apply to C++, which I'm also happy to use. I mean, omitting dots and parens is primarily of value in flexible DSLs. Otherwise? Talk like adults and figure out the idioms you wish you adopt. Does one of your developers do something that you don't like. Then y'all talk it out. Not hard. Consistency is important, but effectiveness is, by my lights, m…

"Talking it out" isn't an option when you're dealing with code that's older than last week, let alone code written by developers that you've never met - you can't talk it out retroactively. That's a huge part of the 'which effective subset' argument against C++ and Scala. The argument is that, in the long term, 'simplicity and consistency', even if clunky at times, are way more effective than 'expressiveness'.
Post reply on HN