Faster and smaller Haskell, with a pointer to Qi

Haskell is one of those languanges i keep an eye on, accumulating links and books in my maybe/someday task list (the other forerunner in there being Smalltak). To be fair, i’ve actually read a couple of tutorials and books, but, for some reason or the other, it never sticks in (a minor nit that, in the long run, ends up being a hurdle is that, unlike Smalltalk’s, i find Haskell’s syntax ugly).

Haskell has a long list of features that make it an excellent, and sometimes unique, language. Some of them i miss in Lisp, like (built-in) pattern matching a la ML or currying, which fits like a glove in a functional programming style (if you’re in maths or physics or for some other reason play a lot with tensors, you’ll be currying all the time). As an aside, some months ago i noticed that i am not the only one to miss these features in Lisp: Lambda Associates‘s Qi extends Lisp precisely in those directions (and then more).

Another fun feature of Haskell is laziness (but we have that in Scheme too). On the one hand, it provides the means for extremely elegant constructions, like e.g. circular, infinite data structures. On the other hand, it poses lots of challenges when it comes to evaluate and/or guarantee time and space requirements for your programs. I just found and article entitled Making Haskell programs faster and smaller which makes an in-depth analysis of these (potential) problems, with solutions, that may help you in your Haskell adventures. My unqualified opinion is that i prefer the Scheme way: call by value by default, with call by need, well, when needed.

Tags: ,

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: