3 ms·
m4 comes from an ancient lineage of macro processors going back to the early 1960s. There’s a nice summary of the history in the m4 manual, https://www.gnu.org/
by fanf2 3y ago
m4 comes from an ancient lineage of macro processors going back to the early 1960s. There’s a nice summary of the history in the m4 manual, https://www.gnu.org/software/m4/manual/html_node/History.html https://www.gnu.org/software/m4/manual/html_node/History.htm...
A big weirdness is that argument separators are identified after macros in the argument list have been expanded, which makes it difficult to understand a macro invocation by itself.
The POSIX specification seems to erroneously say that arguments are not subject to macro expansion https://pubs.opengroup.org/onlinepubs/9699919799/utilities/m4.html https://pubs.opengroup.org/onlinepubs/9699919799/utilities/m... whereas the 7th edition manual clearly says they are https://man.cat-v.org/unix_7th/1/m4 https://man.cat-v.org/unix_7th/1/m4