tags:

views:

524

answers:

6

I have been reading about Scala for a while and even wrote some small programs to better understand some of the more exoteric features.

Today I decided to do my first "real project", translating some 60 lines of ugly Java code to Scala to rewrite it using the better pattern-matching features (why? because the Java version was becoming hard to maintain due to excessive combination of regex and conditionals).

About halfway through the editing process, Eclipse thew up this error:

alt text

I get the general impression that the Scala IDE in Eclipse is a lot buggier and less complete than its Java equivalent. Is this correct or do I just have a bad installation? Is there a better IDE for Scala?

+3  A: 

From my own experience with Eclipse, using it for languages other than Java is never quite as good.

You might find this post of interest.

miorel
+1  A: 

I get the general impression an IDE for a new, young, niche language is a lot buggier and less complete than a widespread, supported, mature language

Try Netbeans. Its plugins are generally of a simpler construction anyway, so should have less 'gotchas'

Andrew Bolster
+4  A: 

The Eclipse IDE Scala support has not been great for some time, but is now receiving additional development effort alongside the introduction of Scala 2.8, and appears to be improving. For Scala 2.7 I have found the Intellij plugin to be in a better state.

One problem that both of these plugins have is that Scala itself is a moving target - Scala 2.8 has introduced additional syntax and structures to Scala 2.7.

Brian Agnew
Indeed - and they have just changed how scala adds its own metadata in `.class` files, which will undoubtedly affect the IDEs again
oxbow_lakes
@oxbow_lakes - is that a 2.8 change or later ?
Brian Agnew
It's for 2.8 and literally happened in the last few weeks. Of course, it does not affect the API, only the compiler (and anything else that cares about getting *scala-specific* information out of a "scala" `.class` file)
oxbow_lakes
See here: http://permalink.gmane.org/gmane.comp.lang.scala.internals/3062
oxbow_lakes
@oxbow_lakes - most useful, thx.
Brian Agnew
+1  A: 

One point to make is that it is possible that people are still put off IntelliJ because they assume that the licence is expensive, especially if they are happy with Eclipse and are unaware of the Community Edition which is free and open source.

I cannot give any comparison with the other IDEs as I have always used IntelliJ, however the Scala support is certainly good, all things considered, and getting better.

Don Mackenzie
I've switched from Eclipse to IntelliJ about 5 months ago because of the better Scala support.
ziggystar
+5  A: 

I really like IntelliJ Idea Community Edition's Scala support. I've been using it from it's early days. I've also tested Netbeans and Eclipse plugins but I really don't like them that much. Especially all Eclipse Scala plugins are crap. I also tested Textmate Scala bundle, which is very nice but doesn't offer auto completion.

Here is my Scala Ide top list:

  1. IntelliJ Idea Community Edition
  2. Netbeans
  3. Textmate (This is here, since I really like Textmate for writing Rails applications)
  4. Eclipse

When you learn IntelliJ Idea keyboard shortcuts and add some live templates you can be very productive programmer. Furthermore, if you buy the Intellij Idea Ultimate Edition you can even share the settings with multiple computers or with your team.

What I suggest:

  1. Download IntelliJ Idea Community Edition
  2. Install the Scala plugin
  3. Learn the keyboard shortcuts: Windows and Linux, Mac
  4. Configure Live Templates when you get more familiar with the ide
Pekka Mattila
I even tried the EAP version of the IntelliJ Idea. The IntelliJ Idea 9 EAP version can be found from: http://confluence.jetbrains.net/display/IDEADEV/Maia+EAP. I've been using 94.663 version. It works very well, but it has few minor glitches. Currently I am downloading the newest 95.4 version.
Pekka Mattila
+1  A: 

We are using Eclipse Scala plugin at work and working with it is quite terrible. One cannot really trust reported errors inside IDE, runtime exceptions are the order of the day. Our best experience is with build from 25-11-2009.

At home I play with IntelliJ 9 and its Scala plugin and I find it much much better. I am newbie to IntelliJ but I am very impressed with all those little details which (once you get used to them) increase your productivity... a lot.

The drawback is in IntelliJ there is no compile-error reporting on the fly (at the time you're writing code) yet implemented and only Scala up to 2.7 is supported (2.8 by nightly builds only), but there are NO runtime exceptions while working with the IDE. I would recommend you to try IntelliJ, community edition at least.

doom2.wad
If you're running IDEA 9, then both Scala 2.7 and 2.8 are supported by the Scala plug-in. The latest IDEA EAP (for 9.0.2, at the moment) is definitely recommended and it allows you to use a later version of the Scala pulg-in.
Randall Schulz