[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: M4 syntax $11 vs. ${11}
From: |
Paul Eggert |
Subject: |
Re: M4 syntax $11 vs. ${11} |
Date: |
Mon, 29 Jan 2007 09:39:35 -0800 |
User-agent: |
Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux) |
Eric Blake <address@hidden> writes:
> Because I was hoping that M4 2.0 could borrow a leaf from shell parsing,
> and ALSO implement things like ${1-default} that is more compact than the
> current ifelse(`$1',,`default',`$1') in M4 parlance.
Sure, but doesn't that just delay the conversion problem? The price
will eventually have to be paid for having a syntax that is so close
to the shell's.
How about if M4 uses a slightly-different syntax, so that the two uses
are never confused? That way, the conversion problem won't ever have
to be addressed, and Autoconf won't have to disable the extension
during a transition period.
So, for example, suppose M4 uses the syntax ${{11}} to refer to
argument 11? Or (if you prefer something shorter) ${+11}? An
advantage to this sort of approach is that it gives you more leeway
for future extensions.