4 ms·
Ask HN: How should I get started with Scala?
According to amazon reviews, Beginning Scala and Venkat's Programming Scala assume Java background (which I don't have), O'reilly's Programming Scala looks like a good reference but not a good tutorial (because it's dense and has forward references), and Odersky's Programming in Scala looks pretty good?
Have any of y'all looked at more than one of these books? How do they compare? One thing that worries me is that comments I've seen that most tutorials are broken becaues Scala changes so rapidly. Should I avoid older Scala books because of that?
- DanielStraight 17y agoFor what's it's worth, I've never made it more than 20% of the way through a Scala tutorial before it broke down on account of incompatibility. Eventually, I gave up. I would definitely take the warnings about broken tutorials to heart.
- plinkplonk 17y agoIn practice, it is very hard, if not impossible, to make any sustained progress in Scala (and Clojure) with zero background in Java. Both are "power tools" for people comfortable with the Java ecosystem. Both change fast neither is in a state where you can have zero knowledge of java(and the associated bits of the java ecosystem like classloaders, classpaths and so on) and still program anything except toy examples comfortably. If you don't have a (minimal) java background you should probably acquire that first (unless you have a buddy/mentor who can ease you over any java/jvm roadbumps as they appear).
- runevault 17y agoI've barely touched Scala, but with Clojure the only real roadbump I've run into so far when I was getting started was classpath. If you're doing pure Clojure classloaders seem to be a non-issue, or have been for me to this point (in the middle of building a web app w/Mongodb for a backend). Of course if I haven't gotten serious about building so we'll see if lein is good enough or if Maven becomes a necessity. But in general I'd say you can JIT learn the parts of the JVM that give you pain.
- plinkplonk 17y ago" (in the middle of building a web app w/Mongodb for a backend)" you probably have worked with java before and have internalized quite a bit. For e.g I'd guess you are using some kind of servlet based framework to build your web app. Plenty of knowledge reqd right there. I'd be very surprised if someone could (as of today) build anything substantial in Clojure knowing zero java. (I did emphasise the "zero" bit in my original post).
- runevault 17y agoI touched java 1.0 or some such (super early days) very briefly way back when, but otherwise haven't really touched it. Mind you I'm very much a polyglot programmer type so maybe I just know how to do the right google searches to quickly get answers? And the app I'm talking about is using compojure + CongoMongo so it doesn't take any knowledge of the underlying Jetty to do much, Compojure hides a lot of that.
- rit 17y agoActually, my coworkers who are Java programmers complained of the opposite - they felt the Scala books didn't link in Java enough and assumed experience in things like Ruby and the like. I found Venkat's book to be a good solid, terse start which gives you the bulk of what you need to start poking around. After that, the O'Reilly book is solid for really building meat. It's also available for free online if you want to really look at how usable it is for you: http://programming-scala.labs.oreilly.com/ http://programming-scala.labs.oreilly.com/