3 ms·
Powerful macros and functions make it harder to reason about code. In Lisp and Smalltalk, you can look at the inside of a function and have some idea what it i
by omouse 17y ago
Powerful macros and functions make it harder to reason about code.
In Lisp and Smalltalk, you can look at the inside of a function and have some idea what it is doing.
With Lisp you can use #'DISASSEMBLE and with any Smalltalk worth its weight, you can simple click around and find the method that you want to look at
- twopoint718 17y agoI agree completely, the notion of the "inscrutable macro" is often brought up when arguing against a Lisp. Whatever one could say is dangerous about macros, I would argue, could be said equally of functions. But I think something else is going on here, the Inscrutable Macro idea serves as a kind of "intuition pump" (of the negative kind) http://en.wikipedia.org/wiki/Intuition_pump http://en.wikipedia.org/wiki/Intuition_pump to try and demonstrate macros' badness. If someone isn't very familiar with lisp they'll offer code that's merely not idiomatic, when someone is familiar with lisp then they'll offer up something that's just downright pathological, and I'll be the first to admit, that a pathological macro can be really pathological. At this point, equipped with their executable straw man, they claim "this macro is insane, and so macros are unmanageable." If the measure for unmanageability is just that impossible-to-understand code can be written in some language then the IOCCC means C shouldn't be used. In practice the Inscrutable Macro just isn't written.