Re:Writing Complex Macros in Rust: Reverse Polish Notation
by kazinator on Thursday February 01, 2018 @05:36PM
(#16286610)
Many Lisp dialects are not homoiconic, as defined in the Wikipedia page for "homoiconic".
Homoiconic means that procedures are stored in representation in which they are written, or more or less.
A Lisp that compiles everything entered at the REPL isn't homoiconic. The input looks like (lambda (...) ...), but the storage is some block of x86 machine code with an environment vector.
POSIX shells are homoiconic. When you type set, you see your functions, in source code form (modulo reformatting).
The thing you want for metaprogramming is a smart internal representation of program text (not same as the external one).
Homoiconic means that procedures are stored in representation in which they are written, or more or less.
A Lisp that compiles everything entered at the REPL isn't homoiconic. The input looks like (lambda (...) ...), but the storage is some block of x86 machine code with an environment vector.
POSIX shells are homoiconic. When you type set, you see your functions, in source code form (modulo reformatting).
The thing you want for metaprogramming is a smart internal representation of program text (not same as the external one).