#ifdef considered harmful (was: DData)
Sven Panne
Sven.Panne at aedion.de
Tue Apr 6 20:55:11 EDT 2004
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
>> basically impossible.
> 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.
>> There should be no externally visible type differences in standard
>> libraries. [...]
> 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...
Cheers,
S.
More information about the Libraries
mailing list