After the slowness caused by Prolog, I managed to finish Scala almost on time this week. I’ve used Scala before, to build an Android widget and a compiler for Caml Light, but I can’t really say I like the language too much.
On the one hand, it sounds like a dream language: a powerful functional programming language with strong support for functional programming while retaining OOP support. That sounds pragmatic. Unfortunately, it isn’t: the type system in more complex than in languages like OCaml and the syntax is rather unpleasant for me.
What’s funny is how the “Seven Languages in Seven Weeks”-book basically picks
out the parts of the language that a friend of mine considers warts. First, the
possibility of adding strings together via +
, second the Actors which seem to
be outdated due to Akka and third, XML literals are an awful idea. Kind of
“good on paper, bad in reality” awful, like checked exceptions in Java.
On the other hand, I kinda liked the homework, the size of it was fitting and I had fun exchanging strategies to solve it with a friend. For the censor homework I decided to use a simple string replace but add captitalized variants and read the censor words from a JSON file, whereas my friend used a more efficient solution with regular expressions and a custom text format. Both are valid and it was fun to compare.
Also: the new profile pages on GitHub with the contribution graph are fascinating and awful, because they add a certain amount of game to it (gamification): I have to contribute, otherwise my current streak breaks. And the longer the streak, the more geek-cred. Or something like that. Unfortunately, it also causes more useless commits to prevent streak-breaking.
After all, if I were looking for a JVM language to use on Android phones, Scala would probably be it.