3 ms·
I’d heard that homoiconicity isn’t real and there is no meaningful definition?
by spdegabrielle 4y ago
I’d heard that homoiconicity isn’t real and there is no meaningful definition?
- reikonomusha 4y agoA language is homoiconic if code in that language is written using the syntax of data literals of that language. In the case of most Lisps, code is written using the syntax of list and symbol literals. (There are other literals too, of course.) (I (usually) like apples) is a nested list literal with four symbols. You can think of symbols as "interned strings"; they're written without quotes for convenience. It's not unlike ["I", ["usually"], "like", "apples"] in Python, except I had to use actual strings instead of symbols because Python doesn't ship with a standard symbol type. This is also a nested literal list: (loop for i below n do (print i)) but this happens to be a list literal that can be "run" (or in Lisp parlance, evaluated) as code.