3 ms·
By homoiconicity, I was referring to Julia and Elixir, both of which are cited as being homoiconic (even though some purists disagree). Also, I think "Homoicon
by yellowapple 11y ago
By homoiconicity, I was referring to Julia and Elixir, both of which are cited as being homoiconic (even though some purists disagree).
Also, I think "Homoiconicity isn't the point" misses the point. Homoiconicity isn't about syntax - indeed, Lisp isn't technically confined to s-expressions, and was originally designed for M-expressions before folks realized that s-expressions were much easier to implement - but rather about the ability to represent a program as ordinary data and to manipulate it as such. Yeah, I can do all sorts of metaprogramming in, say, Ruby or Perl, but you won't be able to go very far before you end up passing strings into `eval`; this is because they're not homoiconic (at least in their current forms). Meanwhile, the ability of languages like Elixir to actually modify a program's syntax tree directly - a.k.a. homoiconicity - makes metaprogramming much easier. The two concepts go hand in hand.
S-expressions happen to be very convenient for defining tree-like structures, like - for example - Lisp programs. They're not strictly required, however.