Hacker News new | comments | show | ask | jobs | submit login
Scala 2.9.1 final - faster compilation and many other improvements (scala-lang.org)
54 points by LiveTheDream 2301 days ago | hide | past | web | favorite | 14 comments

I've been waiting for this quite eagerly. There is a compiler regression in 2.9.0_* that prevented people from writing code that interfaced with Hadoop.

What is you current view on Scala vs Clojure? (I know you use both - I mean which one do you pick for what kinds of projecs)

I've been introducing JVM practices to a ruby shop lately, and I felt that Scala was the easier langauge to introduce.

If I were to have total freedom in my choice, I really don't know where I would fall. Scala has some _amazing_ libraries and ensime for emacs is incredible, but its project workflow is almost humorously bad (and I am not a fan of where SBT is going, to the point where I am using raw pom files for project management). Clojure has Leiningen, which is much better to work with, but its library space is mixed in quality and its java interface is still worse than Scala's (and going back from Java to Clojure? Getting better, still harder). Lisp still sings to me, but when you're working with a lot of Java libraries, your freedom to really leverage lisp is blocked somewhat.

So I dunno how I'd come down, now. I like both, I dislike both. Probably depends on my mood that day. I do think that _both_ of those two languages stands pre-eminent for the kinds of systems and platform work I do. It's also easy to hire java folks and train them in; a freedom that isn't offered by other (arguably, always arguably) more powerful languages for this domain like Erlang or Haskell. Given the incredibly competitive hiring environment today, I must grudgingly give them points for that.

Additional info on the faster compilation? I'm new to scala and from what i've seen the main issue with compilation is the time needed to load the api when the compiler starts ( a few seconds, fsc is a workaround to this).

Here is some additional info on faster compilation:

On 2.9.0-1 my project took 21 seconds to compile. On 2.9.1.RC4 it was decreased to 18 seconds. (I tried 3 times with each Scala version). This is a project with 8 source files: https://github.com/cucumber/cucumber-jvm/tree/master/scala

Conclusion: Compile speed went from abysmal in 2.9.0-1 to a tiny bit less abysmal in 2.9.1.RC4.

I haven't tried 2.9.1 since it's not in Maven yet, but I doubt compile speed was improved after the latest RC.

Great to see this come out, but their changelog is pretty odd. A list of numbers without the issue title is kinda hard to get a handle on.

Having said all that, if anyone knows what really went into the release I'd love to hear it. Major fixes or things to look out for would be great.

[edit: Softer language to convey my intent better.]

scala interpreter/REPL is starting up in about 0.5 seconds now compared to 7-8 seconds with on my system using Sun JDK 64-bit.

System scripting in Scala suddenly got a lot more appealing :-)

Hang on--that's 0.5s for server (64-bit) hotspot? That's astonishing.

Any details on how they were able to achieve it?

Aye, 64-bit hotspot with implicit -server switch, but going on your astonishment I took a look and it seems the 0.5s time is only achieved with fsc running from previous runs of the REPL. So from cold, i.e. no fsc running it takes about 3 seconds. 2.9.0-1 was taking 7-8 seconds to get the REPL prompt regardless of whether fsc was running already, so this is still like night and day for me :-)

Amongst other things it looks like Paul Phillips (a.k.a extempore) has done a lot of optimisation work. This looks like a pretty important one:


Oh, ok, so fsc is comparable to just connecting to a nailgun daemon, right?

I don't actually know Scala; is there a tl;dr for that link?

That's still a pretty massively long time compared to, say, Ocaml or Haskell. (0.01 seconds for hello world, for both of them)

It's still appeals too long for me.

And the previous release announcements look all the same except for the bug list. Imho a brief description, at least for final releases, would be a nice addition. Not everyone follows the scala-language mailing list.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact