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

John A. De Goes john at n-brain.net
Fri Jan 9 09:46:09 EST 2009

Hi Austin,

How do you know it's not your experience with FFI code that isn't  
biased? As far as I know, there has been no systematic attempt to  
document whether pure Haskell or FFI-based libraries are better  
designed and better maintained. Which means your statements come from  
your experience, and my statements come from my experience, and the  
truth is probably somewhere in between.

In my experience, FFI code is often based on bulk translation of C  
header files into the IO monad. It requires an exact version of a  
library to work (usually much older than the current), it does not  
compile out of the box, there's scant documentation, and very little  
high-level design has been imposed on the low-level C interface (may  
as well use C!). Exceptions to this rule, there are, but as I said  
before, my experience leads me to believe they *are* exceptions to a  
*general* rule.



On Jan 8, 2009, at 3:47 PM, Austin Seipp wrote:

> Excerpts from John A. De Goes's message of Thu Jan 08 12:14:18 -0600  
> 2009:
>> But really, what's the point? FFI code is fragile, often uncompilable
>> and unsupported, and doesn't observe the idioms of Haskell nor take
>> advantage of its powerful language features.
> This is a completely unfair generalization. The FFI is an excellent
> way to interoperate with an extraordinary amount of external
> libraries, and if you ask me, it's *worth* taking those pieces of C
> code and wrapping them up in a nice, safe haskell interface. I will  
> also
> mention that Haskell has *the* simplest FFI I have ever used, which to
> me only means it's easier to get it right (the fact that there are
> customized *languages* like e.g. cython to make writing python
> extensions easier makes me wonder.)
> I suggest you take a look at the haskell llvm bindings - they are
> extraordinarily well documented, and the high level interface uses
> *many* haskell idioms that make the library safe and easy to use:
> http://hackage.haskell.org/cgi-bin/hackage-scripts/package/ 
> llvm-
> This code most certainly takes advantage of powerful features and
> idioms that only Haskell can provide. Please do not take your bad
> experiences with a few crappy binding (or not even crappy bindings,
> perhaps bindings that just aren't very abstract) and extend them to
> the bindings that are excellent with a sweeping statement like that.
> Austin
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20090109/25fefe79/attachment.htm

More information about the Haskell-Cafe mailing list