News for hackers. Stuff that matters.

Ask HN: What’s the best book/way to learn Scala?

I intend to start hacking with Scala sometime in the near future.

Any pointers regarding how to best learn it? Any books you recommend I get and/or shy away from?

(Also note I have done almost no functional programming, so books that really teach how to think that way are also appreciated.)

( 6 comments | 6 points | on HN )
Re:Ask HN: What’s the best book/way to learn Scala? by codeslinger on Thursday May 13, 2010 @07:59PM (#1346098)
I have all the books currently out now on Scala and I think "Programming Scala" by Wampler and Payne is the best one for learning the language: http://www.amazon.com/Programming-Scala-Scalability-Function...

Steer clear of the Artima book: its huge, out of date and not written particularly well.

Re:Ask HN: What’s the best book/way to learn Scala? by brl on Friday May 14, 2010 @12:49PM (#1347785)
I disagree with this to the point of saying that the Artima book is one of the most well written technical books I've ever read and the O'Reilly book is rather a mess. The Artima book is written by the creator of the language and while it is a couple of years old the information is still 95% relevant to the latest language changes.

I would recommend getting a copy of both of them, but you might want to check out the online version of the O'Reilly book before buying it:

http://programming-scala.labs.oreilly.com/

The Pragmatic Programmers book is not bad either, but it's only a short introduction to the language compared to the other two books mentioned.

All three books have nearly identical titles: Programming (in) Scala

Re:Ask HN: What’s the best book/way to learn Scala? by stephenjudkins on Friday May 14, 2010 @03:44AM (#1346816)
I agree about the Artima book; its organization follows the Scala specification (http://www.scala-lang.org/docu/files/ScalaReference.pdf) very closely. I'd almost advise reading the specification instead, but it's a slog.

The O'Reilly book is great.

Also keep in mind that several important changes or additions to the language have been made with version 2.8, and many books aren't up to date.

Re:Ask HN: What’s the best book/way to learn Scala? by alanh on Thursday May 13, 2010 @08:41PM (#1346169)
Interesting, considering the Artima book has so many 5-star reviews on Amazon.
Re:Ask HN: What’s the best book/way to learn Scala? by gtani on Friday May 14, 2010 @06:29PM (#1348813)
I've read most of the OReilly, Artima and Pragmatic books, and read Pollak's book a long time ago (you can read 1/2(?) on google books).

The Pragmatic book is a very gentle intro which makes the type and object systems seem like a ruby- or python-learning exercise. It's not. The Oreilly has the most comprehensive info, and is also quite blunt about 2.7's shortcomings (the animal-trap icons). It's a very dense read but I think it's definitely on the path of least resistance (i.e. not reading it will make learning the language more difficult. Course there's no reason not to read it free, online.

The Artima book, IMHO is really a nice introduction, explains clearly but keeps going at a good pace. It's just a lot to read. The Artima book is also one of the only well-indexed software books I've ever countered, kudo's to authors and production people for that, that's a huge time-saver.

Re:Ask HN: What’s the best book/way to learn Scala? by kashif on Friday May 14, 2010 @01:50PM (#1348010)
No matter what book you read - the Scala syntax will be your biggest problem. I finally 'got it' when I realized or rather made room for the fact that Scala has two sets of syntax - one for OOP and another for functional programming. And it seamlessly mixes the two styles - this creates a lot of confusion for the first time scala programmer. It also makes it diffcult to maintain code within a team of programmers using Scala unless they come to some agreement on style.

On a side note - Scala is not my fav. JVM language because, personally, its in the same class as Perl and C++. Where syntax is concerned Clojure is much cleaner.