Friday, June 18, 2010

Scala IDE has matured for the mass

For a language to be readily used by the mass, in addition to the language itself, it needs a production quality runtime, rich libraries and IDE (I know superstar programmers can use Emacs or vi to program, but I believe the mass including myself really need an IDE that works). As Scala is using the JVM and can use all the libraries written in Java, the first two conditions are already checked. What has been holding it back is the IDE. The good news is, the free intellij IDEA community edition now meets all the needs of the majority of web programmers.
Why? First of all, code complete actually works. Second, it supports Maven project mixing Java and Scala. Third, even though the community edition doesn't support integration with app servers, we can easily launch an embedded Jetty to run the webapp right in the IDE (to see an example, see the example given by Larry H there). The effect is no different from having an integration with Jetty.
Before trying intellij IDEA, I also tried Eclipse and NetBeans. The Scala plugin for Eclipse is of alpha quality (and has always been so for the past several years). Every time I tried it always had all kinds of obvious problems like code-completion not working while it should, showing errors while the code compiles fine with scalac.
The Scala plugin for NetBeans is much better than the Eclipse one and is quite close to being production ready. Basically code complete works. However, when auto-completing a class name, it won't add the import statement for you. In addition, it can't generate the method signature for you when you want to override a method or implement an abstract method. In my opinion these shortcomings must be fixed before it can be used in day-to-day work.

9 comments:

  1. Have you tried Scala Eclipse plugin lately? I mean RC5/RC6. It is very stable in my opinion. I'm using it with Maven plugin in a mixed Scala/Java environment.

    ReplyDelete
  2. Well i disagree on many points with you on this blog post.
    1st
    You didn't mention any Version of the plugins
    2nd
    Referring to your Eclipse critique i guess you mean the old 2.7.x Plugin. Try the 2.8.0 RC 6 Eclipse Version it works ( for me quite ok) www.scala-ide.org
    This eclipse plugin has some fundamentally changes try it!
    3rd
    I think seriously the case for a IDE in general changed quite a lot in the last 1-2 years. Scala, as Clojure include a REPL (http://en.wikipedia.org/wiki/REPL) If you want to start some new project try out new ideas IMO a REPL gives you much faster, better Feedback on how your Idea maps into the language.
    Managing complex depencies, refactorings are still important. But the rise of SBT ( http://code.google.com/p/simple-build-tool/)
    shows that developer needs CAN be served, even by a command line tool. There also seems a way to use SBT from WITHIN IDEA and that seems to compile (way) faster than the included scala compiler.
    Recently it was announced that the IDEA plugin was able to provide some nice Helper functions regarding implicits.
    Scala IDE's keep growing i think its a good thing!

    ReplyDelete
  3. Thanks for sharing your opinions on Scala IDEs. I am glad to know they are progressing.
    I also have an English language suggestion that I think will improve your article. You use the word "mass" when I believe you should use the word "masses". Masses means many many people. Mass usually means a metric measurement similar to weight.

    ReplyDelete
  4. Does the intelliJ scala plugin also give you proper refactoring tools to the degree Eclipse/Jave does? This is another major must have for productively writing and maintaining systems?

    ReplyDelete
  5. [...] la lectura del post de Kent tong para hablar un poco de Scala. Scala es uno de los lenguajes que han ido apareciendo dentro de la [...]

    ReplyDelete
  6. Hi Eugene,
    Thanks for the comment. I did try an RC version of the v2.8 of the Eclipse Scala plugin some time ago and it didn't work. However, the main point is, I've tried it several times but every time it had all kinds of obvious problems. This indicates a significant problem in quality control.

    ReplyDelete
  7. Hi Hardy,
    Yes, it supports refactoring.

    ReplyDelete
  8. Hi devdanke.
    Thanks for the correction! I'll keep it in mind :-)

    ReplyDelete
  9. Hi IDisagree,
    I didn't mention the versions of the Eclipse plugin because I tried several versions of it in the past few years. In addition, I did tried a release of 2.8 of that plugin and it didn't work (main method marked as in error but it ran fine in command line).
    SBT seems to be quite popular these days. But I don't think a build tool is a replacement for an IDE; they are serving different needs. For example, the need to auto-complete, to create import statements, to mark errors on the fly, to refactor and etc are all very important features for programmers and should be present in the IDE.

    ReplyDelete