3 ms·
Would Lisp macros make sense in language that is not homoiconic?
by fleetfox 9y ago
Would Lisp macros make sense in language that is not homoiconic?
- maxiepoo 9y agoYes: http://calculist.org/blog/2012/04/17/homoiconicity-isnt-the-point/ http://calculist.org/blog/2012/04/17/homoiconicity-isnt-the-...
- mcguire 9y agoFine. Would lisp macros make sense in a language that isn't fully parenthesized?
- wtetzner 9y agoYes: https://www.cs.utah.edu/~rafkind/papers/honu-2012.pdf https://www.cs.utah.edu/~rafkind/papers/honu-2012.pdf Honu is a language with Javascript-like syntax, but has support for syntax-case style macros.
- Avshalom 9y agoFactor https://factorcode.org/ https://factorcode.org/ by comparison to gp's article Facotr macros are easy because instead of knowing exactly where and what the arguments are in Factor the reader doesn't have to care.
- kazinator 9y agoMany 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).