[Haskell-cafe] Binary serialization, was Re: Abstraction leak

Paul Moore p.f.moore at gmail.com
Thu Jul 5 11:00:46 EDT 2007

On 05/07/07, Jonathan Cast <jcast at ou.edu> wrote:
> Can't say I agree.  I've been learning Python, and have been very un-impressed
> so far with its library coverage, which I would rate no better than (in terms
> of the POSIX bindings, worse than) Haskell.

It probably depends on your perspective. I've found lots of tasks that
would be a simple library call in Python, but which require me to
write the code myself in Haskell. Examples:

* Send an email
* Parse an ini file
* Gzip compress a data stream
* Calculate the MD5 checksum of a file

(Of course, I may just not have found the relevant library - that says
something about discoverability rather than coverage, I guess).

For bindings, Python's Windows bindings (pywin32) are superb, where
Haskell's are minimal and unmaintained. Of course, that won't matter
to you if you use POSIX...

> The one thing off the top of my head that Python had was Base64, but that's 20
> lines of Haskell tops.  Aside from that, nothing.

But that's 20 lines of code I don't want to write, and more, I don't
know how to write (without looking up the definition of Base64).
Having lots of these seemingly trivial helpers available "out of the
box" is what library coverage means to me. (And Python does have lots
of these - I don't know how Haskell fares in practice).

I'm not trying to start (or fan) a flamewar, but it's interesting how
different people's perspectives on libraries can be...


More information about the Haskell-Cafe mailing list