3 ms·
Let me contradict the other answers with my personal experience: the two IDEs for Scala I know, Scala-IDE (Eclipse based) and IntelliJ are relatively bad. - Th
by the_af 12y ago
Let me contradict the other answers with my personal experience: the two IDEs for Scala I know, Scala-IDE (Eclipse based) and IntelliJ are relatively bad.
- They are very slow.
- They have poor refactoring support (Scala-IDE's support is still marked as experimental; all but the simplest refactoring will often randomly break code, either by not doing a full refactor, or by introducing gibberish).
- Until the latest version of Scala-IDE, you couldn't inspect variable contents while debugging. I can confirm the latest version does let you inspect variables, but I'm not sure how stable this is.
- This is the killer disadvantage for me: both Scala-IDE and IntelliJ give spurious compilation errors pretty often, even for relatively trivial code. I know there are valid technical reasons why this isn't solved yet, but to me it's unacceptable that an IDE for a statically typed language gives spurious compilation errors: after all, compile-time errors are the main tool a statically typed language gives us. It's the one feature that absolutely must work correctly.
- Even trivial autocomplete randomly stops working for Scala-IDE. This may be related to the spurious compilation errors.
I've been told the unofficial recommendation from the Scala community is to disable incremental compilation in the IDE and compile with SBT. Consider what this says about the maturity of current IDEs.
- eweise 12y agoI program in Scala at work full time using Intellij and I'm having a great experience. No weird compilation errors, quick, responsive. Works almost as well as with Java files.
- the_af 12y agoAwesome. My own experience is more with Scala IDE, which is terrible. I tried IntelliJ for a brief time last year, saw it had spurious compilation errors, and the gurus at my office told me it was even worse than Scala IDE (but you know how gurus are...). Out of curiosity: - Do you have incremental compilation enabled with IntelliJ? - Do you ever experience a compile error in the IDE for code that SBT is able to compile successfully?
- eweise 12y agoOur codebase is a few years old so we are using maven for our builds instead of SBT. I've been using the intellij incremental compiler and it seems to work well. Once in a while it will complain so I hit the reimport button on maven and then its fine. There is no code in our codebase that maven compiles but Intellij can't. I do remember using spray.io and Intellij had a hard time with that library but recently the problem has gone away.
- zackangelo 12y agoIntelliJ's Scala support has improved leaps and bounds the past 6 months. I'd give it another try if you have the opportunity.
- lmm 12y agoMy experience with Scala IDE: - Yes, it's very slow. - Refactoring is limited, will sometimes refuse to happen, and will sometimes randomly move 1 character into the wrong place in the file. So yes it does "break", but not in a way that's hard to fix. - Variable inspection when debugging has always worked fine for me. - Scala-IDE never gives a "full" spurious compilation error (one that shows up in the problems tab and with a full icon on the left) - or rather, no more than Eclipse in Java does (the kind where you have to refresh / clean the project do sometimes happen). On some constructs it will show a spurious "presentation" compiler error (red underline, simpler icon on the left), but it's easy to visually tell the two apart. I never think code is broken when it isn't. - Autocomplete never stops working. It does sometimes get slow (several seconds) - I have automatic compilation on save (no incremental config), manual/explicit saving. It's a workflow I'm happy with.
- the_af 12y agoThanks for the info. A couple of questions: > - Variable inspection when debugging has always worked fine for me. Are you using version 3 or 4? In version 3 this definitely didn't work, as stated in the changelog for version 4 ( http://scala-ide.org/docs/changelog.html http://scala-ide.org/docs/changelog.html, look for M3 "Show variable values in hovers when in suspended debug mode". It should be noted that for me, in version 3 selecting and watching a variable doesn't work either). This seems to be fixed in version 4, which was officially released on 2014-12-16. > - Scala-IDE never gives a "full" spurious compilation error True, this seems to be mostly a presentation issue, albeit a very distracting one. However, in my experience occasionally one of these errors will prevent the application from launching from Eclipse (for debugging, for example), which seems very odd. In my experience, autocomplete sometimes stops working completely. Or maybe I'm really impatient :)
- lmm 12y ago> Are you using version 3 or 4? In version 3 this definitely didn't work, as stated in the changelog for version 4 ( http://scala-ide.org/docs/changelog.html http://scala-ide.org/docs/changelog.html, look for M3 "Show variable values in hovers when in suspended debug mode" Oh, I didn't realize you meant hovers; I never use that (even in Java), I always use the pane with the variables in. > In my experience, autocomplete sometimes stops working completely. I sometimes get the "autocompletions took longer than 2 seconds to complete" warning, but after I dismiss it they are there.