4 ms·
Cool hack! M4 gives me flashbacks to nightmares trying to deal with sendmail and configure scripts. Why did this horrible language become so popular? Why has
by mmastrac 11y ago
Cool hack!
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?
- djanowski 11y ago> Cool hack! 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 :)
- vezzy-fnord 11y agoWhy did this horrible language become so popular? 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.
- rwmj 11y ago> Why did this horrible language become so popular? Why has it not been replaced? 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.
- fizixer 11y agobecause it's probably the only language that offers 'general purpose macros'? (general-purpose meaning platform/language independent) 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_processor https://en.wikipedia.org/wiki/General-purpose_macro_processo...
- a3n 11y agoBecause it's been around almost the longest, and because the early users of Unix were its developers. 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 https://en.wikipedia.org/wiki/M4_%28computer_language%29