4 ms·
> Macros allow you to do things in e.g. C which cannot be done via any other mechanism in the language. This isn't really an argument in favor of macros so muc
by copsarebastards 12y ago
> Macros allow you to do things in e.g. C which cannot be done via any other mechanism in the language.
This isn't really an argument in favor of macros so much as an argument against minimally-featured languages like C.
To be clear, I'm not against using macros in every case. I think a lot of the danger of macros in C comes from C's syntax: macros become a much more powerful tool when you're using a homoiconic language like Lisp. There are a few different projects which have attempted to write languages with C-like semantics and Lisp-like syntax, but sadly none have gained traction.