News for hackers. Stuff that matters.
Re:Under the Hood with Java 10 Enhanced Generics by the_af on Monday December 29, 2014 @08:00PM (#8812755)
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 by lmm on Tuesday December 30, 2014 @03:16AM (#8813783)
I won't touch IntelliJ, but I find Eclipse good enough to work with. I've seen the syntax-errors-in-random-files bug occasionally; it's always been a block of text "moved" to the wrong place in the file. Annoying and worrying, but pretty quick to fix. Debugging has always been reliable though, and simpler refactoring works, and it's getting better at a good rate. But yeah, the problems are real.
Re:Under the Hood with Java 10 Enhanced Generics by the_af on Tuesday December 30, 2014 @10:43AM (#8814997)
It's interesting that debugging is reliable in your setup. I use Kepler-based Scala IDE, and debugging sometimes doesn't work, which means: not all expressions are inspectable. Sometimes you cannot inspect the value of a variable. I'm beginning to think this is actually a Scala issue: maybe those expressions simply get elided in the actual bytecode?
Re:Under the Hood with Java 10 Enhanced Generics by lmm on Tuesday December 30, 2014 @11:20AM (#8815178)
It's possible; I tend to only look at member variables. Note that if you're inside a block then variables from a slightly larger scope are often under this/this$2 or similar. Are you using the old scala debugger or the new one? (I'm using Luna now, which didn't give me the choice, so presumably the new one is stable enough that they've made it the default?)
Re:Under the Hood with Java 10 Enhanced Generics by eropple on Monday December 29, 2014 @08:13PM (#8812795)
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 by timv on Monday December 29, 2014 @10:01PM (#8813091)
My experience is much more like the one described by the_af .

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.

Re:Under the Hood with Java 10 Enhanced Generics by eropple on Tuesday December 30, 2014 @02:06AM (#8813658)
Huh, I use Slick quite a lot and never have trouble. Never used Spray. I guess I don't write terribly complex stuff (I really do use Scala largely as I'd use a JVM C#, I suppose) in general, though.

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!

Re:Under the Hood with Java 10 Enhanced Generics by the_af on Tuesday December 30, 2014 @10:40AM (#8814977)
I don't write complex Scala code either. Simple renaming doesn't reliably work for me on Kepler-based Scala IDE for Ubuntu :( This means sometimes it will fail to rename in every call site, and sometimes it will introduce random symbols.
Re:Under the Hood with Java 10 Enhanced Generics by eropple on Tuesday December 30, 2014 @01:25PM (#8815853)
I've never found ScalaIDE worth the time of day--I wrote Scala in Vim before IDEA 11. There, simple renames work fine. =)
Re:Under the Hood with Java 10 Enhanced Generics by kasey_junk on Monday December 29, 2014 @10:57PM (#8813238)
I'd suggest that there are lots of people who consider these issues as disappointing as you do, they just don't intersect very well with people who continue to program Scala.

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.