Permalink

Haskell even more concise than Python...

04 AUG 2003

My minimal blogging tool is currently written in Python, mostly because when I wrote it, I couldn't find an FTP client library for Haskell. Just for kicks, I decided to rewrite it into Haskell anyway, just to see how different the code would look. It turned out the Haskell version is noticeably shorter. This is interesting because when I've done microbenchmarks like those at The Great Computer Language Shootout, they've always ended up about the same line count as their Python equivalents. In this project, it seems the slight differences are adding up. I've not finished yet, so I'll let you know how it comes out in the end, but so far I'm seeing that every function definition is a few lines shorter in the Haskell version, which leaves the totals at 416 LOC for the Python version and 353 for the Haskell version.

They say that the productivity of programmers is constant in terms of lines per day, regardless of the language used. Does that mean we should all be using the K language? At what point does concise expression conflict with readability? I think Haskell and Python are both doing fine, but can we get any more concise without making a mess? Anybody using K, J, or similarly terse languages out there care to comment?