top | item 7621622

Scala 2.11.0 Release Notes

140 points| philippelh | 12 years ago |scala-lang.org

72 comments

order

some_pythonista|12 years ago

Relevant: "Functional Programming Principles in Scala" starts in 4 days on coursera, which was created by the author of scala.

https://www.coursera.org/course/progfun

eranation|12 years ago

This is a great course, love it and recommend any developer taking it.

Having that said, if all you want is to "switch from imperative language X to Scala", (e.g. from Java) and you want to learn first how to do the "non functional" stuff in Scala, then keep in mind that this course is teaching functional programming first, Scala later. You can do (if you want) very imperative and object oriented style of coding in Scala but this course is not focusing on that part of the language (not because it's bad, but simply because the course is about functional programming)

With that said, go and enroll, it's one of the best coursera courses I took. Great videos, and very interesting programming assignments (many are adaptations from SICP I later learned) and great forum discussions.

terhechte|12 years ago

I concur, this is a really good course. I've since switched to Clojure but I still think that I gained a lot from working through this course. It is a really great introduction into functional programming paradigms, and well worth it even if you don't plan to continue using Scala.

agumonkey|12 years ago

A nice complementary one on coursera is proglang, taught by Dan Grossman (at least the first run was), uses racket/sml/ruby.

Very nice, with a focus on interpretation and comparison points between paradigms.

eweise|12 years ago

I took this and its really good. Highly recommend

virtualwhys|12 years ago

Compared to 2.10 the 2.11 release is nothing special: some optimizations, bunch of bug fixes and deprecations (that hopefully lead to slash and burn of little used language features in 2.12).

Curious to test out build times in 2.11, sounds like some minor gains have been made there, and more to come in the 2.11 release cycle as the new scalac optimiser is integrated (http://magarciaepfl.github.io/scala/)

ebiester|12 years ago

That's really exciting to me. (So is slash and burn, though.) Give me another two years of compiler improvements, bug fixes, and IDE/tooling improvements!

ssmoot|12 years ago

async/await and removal of the case-class/tuple 22 field limit are the big ones I think. (edit: the limit is still in effect for Tuple apparently. Only removed for case-classes.)

In database (or Actor ask) heavy code dealing with a lot of Futures async/await has the potential to fairly significantly influence code style. for-comprehensions often don't cut it when you're dealing with a Future[Option[User]] and need to pull in their assigned roles from a Future[Seq[Role]].

  val userOption = db.get(userId) flatMap {
    case None => Future.successful(None)
    case Some(user) =>
      Future.sequence {
        user.roleIds map(db.get(_))
      } map { roles =>
        Some(user.copy(roles = roles.flatten))
      }
  }
vs:

  val userOption = async {
    for {
      user  <- await(db.get(userId))
      roles  = await(Future.sequence(user.roleIds map(db.get(_))))
    } yield user.copy(roles = roles.flatten)
  }
Or something like that anyways.

ludicast|12 years ago

For me the most exciting part is that they are bringing in support for Java 8. Though lambdas don't impress anyone already using a functional language on the JVM, the introduction of Nashorn and the merger of JodaTime are pretty awesome.

Java 8 is the most exciting release since Java 2 in my opinion.

ebiester|12 years ago

I would say Java 5 instead. Even as poorly as Generics were implemented, it was a lot better than having nothing.

film42|12 years ago

Probably the best change in my opinion was resolving the arity limit for case classes: https://issues.scala-lang.org/browse/SI-7296

I've bumped up against that limit pretty bad while trying to deserialize json. Shapeless did a lot to solve the problem, but I'm sure glad that limit has been removed.

neverminder|12 years ago

I wish the same was done for tuples, but it wasn't and it's unclear whether that's even in plans.

soq_4|12 years ago

Another really big change is the AnyRefMap class which provides a very fast mutable hashmap. There's also a specialized map for keys of type long.

netcraft|12 years ago

I want to be writing scala so bad, but there doesn't seem to be any jobs in my area. Are there any scala specific job boards out there?

MBlume|12 years ago

Go to meetups. This is fully general advice if you wish you had a job programming $LANGUAGE or $FRAMEWORK or whatever. Go to meetups for the job you want, not the job you have.

neverminder|12 years ago

This is a tough one. I've started working with Scala full time by convincing my boss that this is the way to go. Let's just say without going into too much detail that I've proved my point, because our original stack now looks just miserable in comparison. From what I can see (at least in UK) Scala jobs are more of the high end ones and usually has to do with finances and/or "big data", which is why there aren't many of them. Also, I think Scala if not for everyone which is why it's usually used by someone who's more or less a seasoned professional mastered more than one language.

eldavido|12 years ago

A good start would be putting your contact info in your "about" on HN. I know a few people here in SF looking for contractors who'd probably be happy to send some work your way...

craigwblake|12 years ago

I haven't seen any job boards specific to Scala, but there do seem to be more jobs popping up looking for Scala experience.

You could also work at evangelizing Scala in your current (presumably) Java shop. I've found success with this approach by getting other developers interested in the language and mentoring them, especially during the steeper parts of the learning curve. If you can pique the interest of a good portion of the development team it's often not too difficult to get a new language introduced through smaller non-critical or non-production systems, which is a good foothold with which to get the benefits visible to the wider group. YMMV of course.

caoilte|12 years ago

Do the Coursera courses and demonstrate an interest. When we hire we look for developers with 2-3 languages under their belt. Only one has to be professional for a jnr/mid candidate. Most other Scala shops I know of work the same way.

Even this low bar eliminates 90% of candidates so it won't take much for you to shine at this level.

If you're snr then you might find yourself actually having to introduce Scala at a Java shop. Run dojos, lunchtime lightning/brown bag talks and lever it in as a testing framework or throwaway prototype. If that doesn't work, start questioning what you did to deserve being called snr.

jluxenberg|12 years ago

Probably not in your geographical area, but we use Scala at Nest! Contact me:

jared at nestlabs dot com

DLarsen|12 years ago

We're hiring for Scala development near Los Angeles. (Ventura County) We don't expect you to have prior professional Scala development; a sharp dev can get up to speed and start writing decent Scala fairly quickly. (Profile has my contact info.)

azth|12 years ago

Where are you based? Reach me via email (it is on my profile page).

pea|12 years ago

We are hiring scala devs at Kivo in London. Ping me leo@kivo.com

jluxenberg|12 years ago

Buried in the release notes is this gem: reflection via ClassTags wasn't (and still isn't) threadsafe in 2.10; this has been fixed in 2.11 (see http://docs.scala-lang.org/overviews/reflection/thread-safet...)

eugene_burmako|12 years ago

ClassTags were always thread-safe - they are simple wrappers over j.l.Class. TypeTags however were not, and that's supposed to be fixed in 2.11.0.

lmm|12 years ago

Great to hear that's been fixed - I saw an issue that was a manifestation of this, and in particular it made akka's experimental typed actors entirely unusable for my case.

oelang|12 years ago

Is this the first mayor scala release that doesn't introduce a huge language or library change? Transitioning to 2.11 should be smooth, aside from some library deprecations not much has changed.

frowaway001|12 years ago

There have not been any huge library/language changes since 2.8.