haskell

Functional programming to the rescue / 2008-05-09

Three days of JavaOne was enough to completely sour me on the entire idea of programming. I'm not really sure what did it. But then I made the right decision and went to the BayFP meeting. I left feeling quite rejuvenated, my faith in humanity and love of programming fully restored.

Hitting the wall / 2008-03-10

In my last post, I translated the first part of Data types a la carte into Scala. I decided to push ahead into the next section, just for fun. The summary is: Scala's implicits are a very poor man's type classes, at least using the obvious encoding, and I am as always humbled by the cleverness of GHC.

Scala vs Skalleh / 2008-03-07

I apologize for what you're about to see...

As a little experiment, I decided to translate part of this pearl from Haskell to Scala. By this I mean literal translation, as opposed to an idiomatic implementation in Scala. Of course, this goes deeply against the grain of the Scala language. On the other hand, as I wrote here:

It certainly cuts across the grain of current practice, and the grain of the libraries. But I think it takes a long time to discern the grain of a language. And I think it takes a lot of pushing and prodding, which is why I think this kind of experimentation is so important.

For now, it's a reasonable default to stick to a style that reflects the origins of the language (mostly Java-style OO with some functional goodies and richer types). I definitely think we should be open to the possibility that Scala style will diverge more radically from this tradition.

At this point, I'd probably replace the word "important" with "fun and maybe sort of worthwhile." Anyway, let's get started...