25Apr/092

Scala Cheat Sheet Created

I started teaching myself Scala this week because I want to speed up coding of new projects without sacrificing quality, readability, reliability and performance. Scala seems like a good choice for this. I've also been interested in learning more about functional programming, and exploring the concurrency benefits that functional programming can bring to the table.

I've read halfway through a book on Erlang , another functional programming language, and am finding many similarities to Scala. (That book, BTW, "Programming Erlang: Software for a Concurrent World", by Joe Armstrong , is an excellent book and I highly recommend it.)

So far, I'm liking Scala a lot. It's comfortable because of it's close ties to Java and the fact that it runs in the JVM. It's also compatible with much of the Java code I've written in my life, so that's a huge plus!

My only complaint at this point is with the documentation I've found. There's a lot of great online documentation, but the quick start articles I've read thus far seem to skip all over the place and leave a lot out, so I find myself flipping from one to the other trying to make sense of what I'm reading. It would be a lot easier if I had a concise reference to glance at.

Scala Cheat SheetI decided that what's needed is a cheat sheet (pdf), but then couldn't find one, and because necessity is the mother of invention, I've written my own.

Now beware, this cheat sheet was created by a newborn 3-day old Scala programmer, so there may be a lot of corrections needed, and I'm certain it needs more information added to it, but I think this is good enough to start with for a quick start guide.

[Update: I've made several improvements and added a version number that I'll increment every time I update it.]


References for the quick start cheat sheet:

The Busy Developers' Guide to Scala series:

Scala Reference Manuals:

"Scala for Java programmers", A. Sundararajan's Weblog, blogs.sun.com

Filed under: Scala Leave a comment
Comments (2) Trackbacks (0)
  1. Hello. Thank you for putting this cheat sheet together! One correction so far: It’s AnyRef that maps to java.lang.Object, not AnyVal.

  2. Also in the section on iteration, you used “;” instead of “if”:

    for (i <- 1 to 10; i % 2 == 0)

    should be

    for (i <- 1 to 10 if i % 2 == 0)


Leave a comment


No trackbacks yet.