Russ Allbery <[EMAIL PROTECTED]> writes:

> However, cpp has the significant advantage that its active syntax is
> designed to be embedded in a programming language and are Perl comments.
> This is *not* true of m4, which would be horribly, horribly confused by a
> Perl script.

I fail to see this point.
Having a program depend on a preprocessing stage that, if skipped,
would still result in valid but erroneous source seems dangerous to me.

> m4 was not designed with embedding in a programming language in
> mind, and lots of things like macro invocation syntax and default
> quoting characters would interact very poorly with Perl.

I wouldn't classify the cpp language (#ifdef #define #include)
friendly to C either. It looks as if they happily co-exist since
invoking the C compiler automatically invokes the preprocessor.

But let's not put energy in a cpp versus m4 discussion. External macro
processors exist and can be applied by suffienciently skillful people
anyway. I think the question we must ask ourselves is: what kind of
preprocessing would we like perl to provide automatically. Also, I
think that preprocessing only plays a relevant role if we have byte
compiling. There a few advantages of a preprocessor if
preprocessing/compilation/execution are _always_ done together.

-- Johan

Reply via email to