3 ms·
>Macros are just EVIL period, anything goes with them. Have you ever worked with a Lisp? Macros are incredibly useful for all sorts of things. For instance,
by davexunit 13y ago
>Macros are just EVIL period, anything goes with them.
Have you ever worked with a Lisp? Macros are incredibly useful for all sorts of things. For instance, the 'if' form is a macro. So are 'define' and 'let'. For an example of something that isn't a core language feature, there's the SRFI-41 Streams API that uses several macros.
I know that this is trite, but as with any feature of any programming language, it can be abused. That doesn't nullify the benefits of macros.
>Good languages dont need macros
I hold the opposite opinion. Good languages need hygienic macros. Macros allow a programmer to build a language suited to their problem space.