3 ms·
I didn't take that to be his main point, but yes, I think so. Though I think it would be more accurate to say "Lisp lets you manipulate the program's AST trivi
by ken 19y ago
I didn't take that to be his main point, but yes, I think so. Though I think it would be more accurate to say "Lisp lets you manipulate the program's AST trivially because the AST is the code".
This is basically Greenspun's 10th Law again. There's no magic in Lisp that's computationally impossible in another language, but it might be simpler to just write a Lisp in that language first. Rubinius did something even tougher: they wrote a Ruby. The advantage of this is that it's backwards-compatible with all their existing code, while upgrading to sexps would not be.
I think the monkeypatching corresponds to only the front half of Lisp macros. The macroexpand part comes from making the monkeypatches log Ruby code, and then running the log.