This is the mail archive of the
autoconf-patches@gnu.org
mailing list for the autoconf project.
Re: patch: libm4.m4
| : | +# m4_sequence( FIRST, LAST, opt FORMAT, opt INCREMENT )
| : | +# --------------------------------------------------
| :
| : I prefer m4_for better. Indeed, adding support for an increment would
| : be nice. Why do you want a new macro instead of just m4_for?
|
| m4_for() is great for incremental for-loops, and should be preferred where
| possible because of the smaller processing overhead. m4_sequence() is a
| completely different tool...
My point is I don't see any difference with
m4_for([i], 1, 10, 1, [m4_format([%d], [i])])
and
m4_sequence(1, 10, [%d], 1)
I agree it is smaller, but is this a win? libm4 should probably
remain a small set of very useful macros, and m4_sequence, currently,
doesn't seem to fit with this definition.
Reusability of m4_sequence looks unlikely, but I may well be
completely wrong. I just need to be convinced we really need
something like m4_sequence instead of an m4_for extended with an
increment.
Akim