I’ve recently been exploring the Scala language. I used it mainly as a scripting language and in conjunction with Python and C++ in a recent research project. Now, I’m starting a more substantial (at least from a coding perspective) project, and I’m faced with the tough decision of what language I should use to write the code. My standard fall-backs are Python and C++. Don’t get me wrong, they’re great languages, both in isolation and when combined. However, for a long time, I’ve been looking for a language with the expressiveness of a high level scripting language, but without the excessive performance penalty.
So far, Scala fits the bill better than anything else I’ve seen. It’s a statically typed language which compiles down to JVM bytecode. Scala attempts to combine the object-oriented and functional programming paradigms in a single language in the most natural way. It has a type system that is among the most powerful I’ve yet seen, and a type inference systems which relieves the user of the burden and verbosity of explicitly annotating the types of most variables.
The power of the type system and the built in functional constructs really make Scala an expressive language. Moreover, the JVM bytecode it produces seems very good. In particular, there seems to be little to no penalty (in terms of performance and resource utilization) over Java. This can probably be chalked up to a combination of the JVM’s awesome performance tuning abilities and the adeptness of the Scala development team at producing efficient JVM bytecode.
Finally, being a JVM language, Scala capable of using Java libraries directly. This means that vast wealth of libraries written in Java are available to a Scala user immediately; in real life projects, this is a huge plus. Anyway, as you can probably tell from the tone of this post, I’m pretty excited about Scala, and the more I explore it, the more I find to like. I’m seriously considering attacking my new research project in Scala, and you’ll likely be hearing much more about my experience with the language on this blog in the future.