#ifdef considered harmful (was: DData)
gk at ninebynine.org
Tue Apr 6 22:06:24 EDT 2004
At 19:55 06/04/04 +0200, Sven Panne wrote:
>Graham Klyne wrote:
>>At 16:12 06/04/04 +0100, Malcolm Wallace wrote:
>>>Much as we all hate cpp, I'm afraid the standard libraries are
>>>already heavily littered with #ifdefs. Getting rid of them is
>>I guess it's the community's choice of what is important, but in my
>>experience this is a major impediment to distributing portable programs
>>written in Haskell for use by non-Haskellite end users.
>Malcolm only pointed out that it is basically impossible to *implement* the
>libraries without #ifdefs due to the different capabilities and internal
>design choices of the Haskell systems. *Using* these libraries should of
>course be possible without reverting to CPP.
The problem here is that, when using Hugs, the source code of the libraries
needs to be part of the input to Hugs.
>>>There should be no externally visible type differences in standard
>>So I would hope, but I seem to recall coming across some variations of
>>function parameters between systems. I don't remember where.
>That shouldn't be the case. I guess we still have some dark corners in the
>POSIX vs. non-POSIX area, suggestions for improving this (and other places,
>too, of course) are highly welcome. It would really be helpful to know what
>caused your grief...
If I rediscover it, I'll send a note to this list.
More information about the Libraries