Feb
2008
To be honest, I’m somewhat kicking myself for writing this post. As I’ve said many times: roundup posts are for people who are too lazy to write real content. I can’t tell you how many blogs I’ve come across which have a roundup-to-post ratio of easily 3:1. You know it’s a bad sign when sites start having roundups of their roundups…
Meta-roundups aside, I decided (after much deliberation) that a single post linking to all six parts of the series would be useful to one or two people. So if you like to save things with del.icio.us or even plain-old-bookmarks (POBMs for short), this is the one! And if no one finds it useful, eh, I suppose Google probably likes it.
Of course it’s always possible that you subscribe to my way of looking at things. If you hate roundups as much as I do, skip this article and go read something useful.
Introductory article giving motivation for learning Scala and some first steps to “get your feet wet” in the language.
Looking at Scala’s syntax in a little more detail. Properties, variables, methods, classes and constructors all find their home here. We also touch on Scala’s import statement (which is a vast improvement over Java’s).
Scala’s method syntax is far too powerful to cover in a single post. Part 3 goes into more detail, as well as introducing the concept of the singleton object and explaining how Scala really doesn’t have statics at all.
Pattern matching is one of the most useful constructs in the entire language. Having a good understanding of it is critical to utilizing Scala to its full potential. This article covers some basic pattern matching, case classes and a bit of exception handling. There are a lot of very interesting comments on this post, so be sure to scroll all the way down!
Getting further away from perfect parity with Java, this article looks at traits (Scala’s more powerful substitute for interfaces) and just skims the surface of type theory applicability in Scala.
This article throws caution to the wind and picks up all the fun, Scala-specific topics I didn’t cover throughout the rest of the series (such as functionals, implicit type conversions, symbolic method names, etc). This is my favorite of the series, simply because it covered many of the really interesting topics.


Comments
For people interested in Scala, it is nice to be able to send them only one link!
Îf scala cut back on some features that are only going to cause it pain, like operator overloading and the 2 types of class and inheritance (i’d prefer a global mechanism of delegation over interfaces - or traits), it would be even better.
Returning more than one value is also highly suspect to me. Say no to easy tuples…
Just wanna say thanks for putting these tutorials up… they’ve been immensely useful!
Thanks for your articles. Great work!
Hi,
It’s been two weeks that Scala is driving me crazy..
I’ve read tutorials over & over, but I don’t know, it didn’t worked…
Then, I lost myself on your blog, read your description, and shout to myself ‘ Damn, it’s me!’
Well, I’m not exactly an experimented or expert Java developper, but I feel comfortable with Java…
I prefer Python, but, when you’re a young developper, you use what the boss says…
Actually, I’m french, and the reason why I leave a comment is that there is no good french tutorial on Scala ( or it’s well hidden )..
And I wanted to ask you, if I could translate your articles to french..
It’ll definitevely not be a perfect translation, neither a reference on Scala, but it could be useful for some french devs, and most of all, it’ll be a good chance for me to dive more deeper in scala..
Anyway, the choice is yours, and it’s more pedagogical ( word is correct? ) for me than anything else…
Oh, I’ve almost forgot to thank you for these articles… I was sceptical about Scala, but now, I have a better feeling with it…
Thanks again
Aykut
Have at it!
I distribute my content under Creative Commons, which basically allows efforts like translation as long as the republication is also licensed CC.
It would be absolutely great to have a french translation of these articles. If you think it’s worth your time, I’ll happily link to the result from this roundup.
Great!
Well, I’ll work on it …
I’ll keep you informed of the translation ..
Also, great articles! Just FYI I read them while going on a bus tour of the Great Ocean road in Australia on my Nokia cell phone’s tiny screen - that’s how good they are!
http://images.google.com.au/images?q=the+great+ocean+road&ie=UTF-8&oe=utf-8&rls=org.mozilla:en-US:official&client=firefox-a&um=1&sa=N&tab=wi
So after learning a bit of Scala from your posts, as you know, I gave it a go:
http://stubbisms.wordpress.com/2008/02/22/my-foray-into-the-world-of-scala/
Thanks for your comment btw!
Great tutorials. Thanks!
I have seen how to use existing Java lib in Scala. My problem is the other way around - How to leverage Scala in Java. I already have a large Java application. I would like to use Scala to develop a DSL for others to use to extend my Java app’s functionality. Can you point me to the right place for samples or info.
Thank in advance.
There’s almost nothing out there regarding best-practice scenarios for using Scala in a Java project. Though, there are a few more options if you’re looking for information on DSLs in Scala. If I may be shamelessly self-promoting: http://www.codecommit.com/blog/ruby/jruby-interop-dsl-in-scala
If you don’t mind, I would like to translate these articles into chinese as that french body.. Thanks.
Go right ahead!
A pdf would be great.
Not a bad idea! Seems it’s time to break out the ol’ HTML-to-LaTeX converter…
@mike - chapter 29 of the artima scala book is about java/scala interop. aside of that, you’d have to sift through scala mailing list.
@duh - (1) you can think of “case” class as syntactic sugar for allowing the concept of algebraic data types and deconstruction required for fp matching. google the paper, then the light will come on. (2) multiple return types - supsect? your logic makes no sense. if you’ve ever returned an object, then you’ve likely returned a type with multiple values emboldened within it. don’t let scala’s new way of looking at things scare you. the research to combine fp and OO behind scala is solid.
good article..very useful to me…thanks a lot
I want to say thank you for write this article…Scala’s method syntax really make too power full
Great articles! Highly accessible even for non-native speakers and provides a very gentle transition from Java to Scala. /me likes.
Post a Comment