Occasionally updated personal site and blog

Martin Odersky’s Scala talk in Munich

TNG, a Munich-based consulting company, had a Scala training this week by Martin Odersky himself, and was generous enough to also host a free talk by Odersky about Scala. Of course, I couldn’t pass up my first opportunity to meet a language inventor in person.

Odersky’s talk was one of the rare events where you listen to someone speak for two hours, and still  feel like you want to hear more. He merged an introductory talk about the why and how of Scala, with a few more advanced topics like Scala’s collections and higher-order functions. On my personal list of technology to watch, it definitely moved Scala from a “maybe interesting” to “pretty cool, will check it out”.

Some tidbits from the talk:

– Scala, or functional languages in general, want you to think in space, not time. Instead of thinking about the order in which things happen, you think about which abstractions to build on top of each other.

– Shared mutable state is the devil. The combination of shared mutable state and concurrency will inevitably lead to heisenbugs.

– Working on collections with methods like map or filter can lead to impressively concise code. A tailor-made example (mapping phone numbers to mnemonic words from a dictionary) that typically takes 100-200 lines of code in other languages was solved in Scala in about a dozen lines.

– Parallelization is mind-blowingly easy. Basically, if you already program in a functional style, all you need to to is tell the compiler to parallelize by using certain keywords, and it will happen automatically. I need to look further into this, but it looks amazingly powerful. It reminded me a bit of garbage collectors – just like managing memory, multi-threaded code is inherently hard and error-prone, so the right way to fix this is not to have better tools to do it, but to not have to do it manually at all.

– IDE support is the biggest headache for using Scala at the moment. The new version 2.9 of Scala, and the accompanying Eclipse plug-in, should come out in a few weeks, and pretty much fix this. Scala support in IntelliJ will probably progress slower, since they write their own compiler for the languages they support.

As a not-so-serious aside, if you want to quickly get a feel of another developer, invite them to a technology event, like that talk. Good, expected answer: “Cool, sounds interesting”. Bad answer: “What is Scala?”. Worse: “You mean, like, talk about programming when I don’t have to?”. Worst, slightly paraphrased: “I fear I might have to learn Java soon, and you tell me that there’s something even newer already?”. All, sadly, encountered in the wild…


Comments are closed.