I find the tour of Scala a nice idea, but found many of the examples wanting; sometimes for general clarity, but mostly because I kept asking myself “why should I care about this feature?”
As an application developer, mathematical examples aren’t particularly satisfying or exciting. As a Java developer, I was also interested in how Scala improves on Java, with respect to a particular language feature.
So, I went through every element of the tour and worked out the feature myself, trying to map it to real-world scenarios I (and, presumably many others) have faced. I find a real (if simplified) context makes not only comprehending a language feature simpler, but also leaves me with a feeling of why the feature exists and what good it does.
I want new languages and tools to make my life easier in some way, and I feel that many of Scala’s features do that. However this was not obvious to me from the tour.
I also thought it would be a bit more helpful to order the tour elements so that things flowed better, as well as some introductory material that clears up some syntax that I found counter-intuitive the first time. I also added a few of my own stops on the tour that I thought would’ve been nice to have the first time through.
Finally, I can’t pass up the opportunity to comment on these features, so each one contains my thoughts at the bottom, which you can skip if you aren’t interested.
I get paid to write Java, and have been so paid for about 10 years (before which I did C and C++). I also write a fair amount of Ruby code, so the concept of a concise language geared toward productivity is not foreign to me.
That being said, most of my examples show “the way you’d have to do it in Java” and then “the Scala way”. I figure most people will come to Scala from Java and appreciate the comparison.