Search This Blog

Wednesday, 29 September 2010

Scala

I'm a Java guy - I've dabbled around in other languages but generally speaking my default language of choice for a project comes back to Java. It's been that way for a while, and quite honestly it's because out of the languages that I've looked at it seems the best "general" one out there. It's extremely versatile, can do an awful lot in the right hands and despite the various myths, well written Java code is really rather speedy these days. More recently though, there's been a lot of talk about Scala - it's been around for a decade or so but it seems it's only recently it's gained a lot of attention.

Every so often something comes along that looks great from an academic perspective, but for various reasons (usually because the industry has made its mind up already) it's not adopted - left to rot and subsequently forgotten about. Then again, every so often something comes along that looks awful from an academic perspective but somehow (usually due to a large corporation investing stupid amounts of money into it) it gains a foothold and we all have to put up with it because that's just the way things are done.

If Scala does end up squarely falling into one of these categories, it'll be the first. From an academic perspective it really does look very good indeed, with much better language level support for the functional side of things that Java looks to bolt on in the 7th (or 8th!) revision of its language. It's harder to pick up in places, yes, but because of its nature it will be. You have to get into the functional mindset to appreciate or use a functional language, just as you have to get in the OO mindset to appreciate and use an OO language such as Java.

The problem? Well, it's entirely on the practical side. A new language means people learning it from scratch, getting into a new mindset, an inevitable short term decrease in productivity whilst people get accustomed to working with it - none of which are good things for a business. And for the majority of people Java is still doing absolutely fine, especially with it's java.util.concurrent libraries. There's no desperate need to switch.

It's hard to say whether it will take off, but over the next few weeks I hope to look at it on a more practical level, playing around with a few demos and seeing if there's anywhere I can sensibly use it to integrate into existing Java code. We'll see what happens!

No comments:

Post a Comment