I have been writing a lot of recursive m4 macros lately, and
have been disappointed to see that m4 doesn't recognize tail
calls and drop the dead stack frame when one occurs. A vivid
example is to watch memory usage for this trivial example.
define(x,`x')
x()
It needlessly eats about 100KB/sec on my Surface netbook.
I suspect someone who knows the code could implement
tail-call optimization easily. So before I dive in to
try to figure out how to do it myself, I ask is there
a pro out there who might like to do it?
Doug