2 ms·
https://en.wikipedia.org/wiki/Homoiconicity https://en.wikipedia.org/wiki/Homoiconicity uncovers where the term came from: the paper describing a text processin
by kazinator 9y ago
https://en.wikipedia.org/wiki/Homoiconicity https://en.wikipedia.org/wiki/Homoiconicity uncovers where the term came from: the paper describing a text processing language called TRAC. Nothing about a fist-class data type other beyond the character string. It seems to have been contrived by sticking the greek prefix "homo" (same) onto "iconic", which is derived from "ikonos" (image). The code in the machine has the same (homo) image (ikonos) as what came from the keyboard.
The Lisp example in that page is irrelevant. eval is not required, in fact, to walk the nested list data structure; some Lisps have an eval which compiles to native code, then calls the resulting function. Lisp data is somewhat homoiconic in that it has a representation which converts back to text. It's not exactly the original text, but there is an important concept at play called "read/print consistency". It is weaker than homoiconicity, which preserves the exact character spelling, more or less.