3 ms·
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
by the_af 12y ago
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).
- eropple 12y agoMaybe 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?
- timv 12y agoMy 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.
- eropple 12y agoHuh, 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!
- the_af 12y agoI 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.
- eropple 12y agoI've never found ScalaIDE worth the time of day--I wrote Scala in Vim before IDEA 11. There, simple renames work fine. =)
- kasey_junk 12y agoI'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.
- lmm 12y agoI 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.
- the_af 12y agoIt'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?
- lmm 12y agoIt'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?)