[Haskell-cafe] Haskell not ready for Foo [was: Re: Hypothetical Haskell job in New York]

John Goerzen jgoerzen at complete.org
Thu Jan 15 11:31:21 EST 2009

On Thu, Jan 15, 2009 at 09:17:55AM -0700, John A. De Goes wrote:
> On Jan 10, 2009, at 4:11 PM, Donn Cave wrote:
>> Maybe I haven't been paying enough attention, but I see Python and
>> Haskell in about the same position on this, especially in light of
>> how different they are (Haskell's FFI is a lot easier!)  Plenty of
>> Python software depends on C library modules and foreign code.  The
>> particular examples you mention - DB and UI - are great examples
>> where it's sort of crazy to do otherwise for just the reasons you
>> go on to list.
> Python has pure interfaces to all the major databases. While it's true  
> there are no "native" GUI libraries, there are pure Python libraries for 
> just about everything else. Haskell is not yet to this point.

By "pure" do you mean "containing python code only"?  I'm looking
through a few, and:

PostgreSQL - psycopg - C
PostgreSQL - pgsql - C
PostgreSQL - pygresql - C
MySQL - mysqldb - C
MS SQL Server - pymssql - C

And any interface that uses ODBC will, by necessity, be calling to C,
because ODBC is defined as a C API and not a network protocol.

Where are all these pure-Python drivers?

> I don't think it's a bold assertion. If I'm using a Haskell library that 
> wraps a C library, and find a bug in it, my chances of tracking down the 
> bug in C code and submitting a patch to whatever group maintains it are 
> exactly zero. On the other hand, if it's a pure Haskell library, I'll at 


> least take a look. What would you do?

You have to balance that against the chances of there being bugs in
code that is used by far fewer people.  I don't care what language
you're talking about -- I'm going to expect the C PostgreSQL library
to be less buggy than a pure reimplementation in any other language,
and will have less concern about its maintenance and stability in the

It's a lot of wheel reinvention to try to re-implement a database
protocol in n languages instead of do it in 1 and bind to it
everywhere else.

AFAIK, the only language where that sort of wheel reinvention is
popular is Java.  But then Java seems to encourage wheel reinvention
anyhow ;-)

-- John

More information about the Haskell-Cafe mailing list