Re:Why Lisp macros are cool, a Perl perspective (2005)
by jstimpfle on Friday April 29, 2022 @06:38AM
(#31203520)
Macros are the wrong tool here (as in most situations). A macro will only expand to the same bad code. What you want is a function that can do everything what's done on a single line here. For slightly more complex cases, use a list to iterate over and call the function. That will replace (number of lines) function calls by a single one.
[ Parent
| on HN ]
Re:Why Lisp macros are cool, a Perl perspective (2005)
by TurboHaskal on Friday April 29, 2022 @09:54AM
(#31205101)
Huh, just for clarification, the code I wrote was never intended to be something that was meant to be abstracted away with a macro.