2 ms·
This ultimately impacts code quality negatively. Macros aren't a tool "for the 31337 ninjas", not more than class inheritance or generic types, or hell, even pr
by TeMPOraL 7y ago
This ultimately impacts code quality negatively. Macros aren't a tool "for the 31337 ninjas", not more than class inheritance or generic types, or hell, even procedures. Macros solve a particular class of problems - they eliminate bloat and boilerplate, allowing you to express your code closer to the way you think about it.
Much like classes can be used as data transfer objects or to build out a large inheritance tree, macros can be used tactically - to DRY up things you otherwise couldn't, or introduce some readability improvement - or strategically, to lift the code up another layer of abstraction, or create DSLs that let you write your code much closer to the problem domain. Because Lisp supports them in an ergonomic way, macros are not seen as something special, but just another tool in the toolbox.