Scala is a great language, but I have a few little grumbles.

Cryptic DSLs

Scala lets you define some crazy DSLs. Ruby does too, although Ruby's tend to broadly follow a few recognizable patterns. Take something like the old RSpec syntax (pre-Cucumber). It was pretty easy to see how to translate from test/unit over to RSpec.

Compare that to Databinder Dispatch, the Scala abstraction library for the Apache HttpClient. I can grok enough of the documentation to see this is potentially a really interesting abstraction, but the DSL is cryptic. So, you call ">>>" which does an implicit conversion to an output stream handler? And if you want to do an authenticated call, you do something else. What about HTTPS? It is sort of an abstraction that doesn't quite abstract. What I really want to be able to do is something like "open(url, options)" and it all just work. Like Ruby's open-uri. Don't make me think about this too much - it is an HTTP call, for chrissake. A few thousand of them are probably fired off from one of my computers while I'm asleep. The actual design of the Databinder abstraction isn't actually explained except, it seems, in the code. The Scaladoc is completely unhelpful. The only thing that actually helps is the 'Common Tasks' page, which may as well be a page from a Harry Potter spellbook. You just wave the magic wand and stuff happens - quite what, it is difficult to actually tell.

The same goes for some of the stuff I see in Lift:

case Req("api" :: "get" :: Nil, _, GetRequest) => () => Full(get)

What on earth is this doing? Pattern matching against the request object - I get that. Is it pattern-matching against the return value of the object? Is that even possible? Or perhaps the => () is something like Seaside-style continuation statefulness magic. Fuck knows. Oh, I get it - it is handing it back Full(get) as a closure, right? But, err, why do I want to do that? Sorry. I'm not trying to act dumb deliberately - I just don't understand and this wiki page on GitHub isn't helping! And, well, we're all busy people, and Rails promises to love me long time.

Build tools

Maven is to Rake like your office HR department is to a ninja.

Powered by WiGit