#ifdef considered harmful

Johannes Waldmann waldmann at imn.htwk-leipzig.de
Wed Apr 7 09:42:48 EDT 2004


Alastair Reid wrote:

> So, I'd like to float the idea that the Haskell preprocessor should _only_ 
> support conditional compilation, that macro expansion should only occur in 
> lines that begin with '#' not in "normal" lines and that macros should always 
> evaluate to expressions with simple scalar types (ints, strings, etc.) 

>    [It's probably simple enough that the preprocessor could
>    easily be built into Hugs if we wanted.  This isn't the primary
>    motivation for this suggestion but it would be nice.]

I'd vote for that (as a user). If we absolutely need preprocessing,
then the above looks like a very reasonable way to go:
1. keep it simple, 2. integrate it with compilers.

best regards,
-- 
-- Johannes Waldmann,  Tel/Fax: (0341) 3076 6479 / 6480 --
------ http://www.imn.htwk-leipzig.de/~waldmann/ ---------



More information about the Libraries mailing list