[eeps] New - EEP 44: Additional preprocessor directives

Vlad Dumitrescu vladdu55@REDACTED
Wed Oct 14 14:32:06 CEST 2015


On Tue, Oct 13, 2015 at 9:49 AM, Raimo Niskanen <raimo+eeps@REDACTED
> wrote:

> New - EEP 44: Additional preprocessor directives
>
>     http://www.erlang.org/eeps/eep-0044.html
>     https://github.com/erlang/eep/blob/master/eeps/eep-0044.md
>

>From my point of view (which I can agree that is not shared by most
others), I would much prefer that the preprocessor would be as feature-thin
as possible. As pointed out, it is the macros that are the source of most
problems, but I write my own parser to handle code with conditional
compilation and if I didn't need to do that I would be much happier.

That could be handled, I think, by trimming the code after it has been
parsed. That is, let the parser understand about -ifdef, -if and friends
and build a corresponding parse tree that is pruned before being sent to
the compiler. Unfortunately, I can't see any good way to make that
backwards compatible - tools can't just ignore the new tree nodes, so I
will most probably have to accept having to reimplement the preprocessor's
job myself.

I don't see this as a negative point for the EEP, but for the preprocessor
in general, and I felt I had to get it off my chest :-)

regards,
Vlad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/eeps/attachments/20151014/3579727d/attachment.htm>


More information about the eeps mailing list