[Haskell-cafe] coding style vs. foreign interfaces

Brandon S Allbery KF8NH allbery.b at gmail.com
Tue Feb 8 01:08:44 CET 2011

Hash: SHA1

On 2/7/11 12:36 , Donn Cave wrote:
> I don't know the OpenGL example, but I gather you're talking about
> an API that's different in a practical way, not just a thin layer
> with the names spelled differently.  In that case, assuming that
> it really is more Haskell-functional-etc, vive la difference!  No
> one would argue with this, I think.

Usually the low level one is merely a thin layer, whereas the high level one
is more than just Haskell conventions but a proper Haskell-style API, using
e.g. monads instead of opaque state blobs.

> helpfully reveals the actual POSIX 1003.1 function names, but
> try for example to figure out what has become of the the fairly
> commonly used "ICANON" flag, without looking at the source.
> If you're hoping that in the course of time a significantly
> functionally designed API will come along for any of these things,
> note that names it might have used are already taken.

+1.  The stuff that's a thin wrapper, such as System.Posix.*, should keep
names as close to the API it's mirroring as possible; if you want to rename
them, do it in the context of an actual Haskell API.

- -- 
brandon s. allbery     [linux,solaris,freebsd,perl]    allbery.b at gmail.com
system administrator  [openafs,heimdal,too many hats]                kf8nh
Version: GnuPG v1.4.11 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/


More information about the Haskell-Cafe mailing list