10 ms·
> I really think this just applies to any kind of indirection - classes, functions, even named constants (vs literals). Disagree. Macros are fundamentally diff
by dreamcompiler 6y ago
> I really think this just applies to any kind of indirection - classes, functions, even named constants (vs literals).
Disagree. Macros are fundamentally different in that they can change the syntax of the language. As such, they can inhibit the code's readability in ways the other defining forms cannot. Looking up something by name in CL is as simple as meta-dot. But you cannot meta-dot syntax. (Well, you could on a Lisp Machine, but not so much on current CL implementations.)
- _bxg1 6y agoIt's a difference of degree, not of kind. Any indirection forces the user to reason about a constructed concept instead of the literal facts of what's happening. By introducing one, you're making the assertion that the abstract concept is easier to reason about (including any effort required to learn it) than the contents being abstracted away.
- TeMPOraL 6y ago> But you cannot meta-dot syntax. You can C-c M-e the macro form to have SLIME expand it for you inline (read-only), and then navigate around it, using e to expand and c to collapse back. Super useful.
- fiddlerwoaroof 6y ago> you cannot meta-dot syntax I don't understand this? Besides the macrostep expander, meta-dot works on the macro name: reader macros _are_ harder to debug, but they're generally discouraged.
- dreamcompiler 6y agoIt requires more cognitive load to interpret new syntactic constructs. See brundolf's comment herein.