M4 gives me flashbacks to nightmares trying to deal with sendmail and configure scripts.
Why did this horrible language become so popular? Why has it not been replaced?
M4 gives me flashbacks to nightmares trying to deal with sendmail and configure scripts.
Why did this horrible language become so popular? Why has it not been replaced?
I wouldn't call m4 "popular" in the slightest, it's generally used by only a few well-known programs like autoconf, sendmail and SELinux.
It's used because it's a standardized way to bolt on substitution macros to a system without having it be intrinsically aware of them.
Why indeed. I think the answer is because it's available everywhere (at least, on all Unix/Linux). I found myself writing yet another m4 macro only a couple of weeks ago and despairing, again.
EDIT 1: there are alternatives [1] but this is the most well-known. Now I'm intrigued by pyexpander.
[1] https://en.wikipedia.org/wiki/General-purpose_macro_processo...
Thanks!
> Why did this horrible language become so popular? Why has it not been replaced?
I don't know. Maybe just like other tools in POSIX systems -- it works :)
Paradigm macro preprocessor
Designed by Brian Kernighan, Dennis Ritchie.
First appeared 1977
Major implementations GNU m4
https://en.wikipedia.org/wiki/M4_%28computer_language%29