Homoiconic languages typically include full support of syntactic macros, allowing the programmer to express transformations of programs in a concise way.
[4] Other examples are the programming languages Clojure (a contemporary dialect of Lisp), Rebol (also its successor Red), Refal, Prolog, and possibly Julia (see the section “Implementation methods” for more details).
At any time, it should be possible to display program or procedural information in the same form as the TRAC processor will act upon it during its execution.
Because TRAC procedures and text have the same representation inside and outside the processor, the term homoiconic is applicable, from homo meaning the same, and icon meaning representation.The last sentence above is annotated with footnote 4, which gives credit for the origin of the term:[a] Following suggestion of McCullough W. S., based upon terminology due to Peirce, C. S.The researchers implicated in this quote might be neurophysiologist and cybernetician Warren Sturgis McCulloch (note the difference in the surname from the note) and philosopher, logician and mathematician Charles Sanders Peirce.
Both are functionally oriented (one list, the other string), both talk to the user with one language, and both are "homoiconic" in that their internal and external representations are essentially the same.
Their only great drawback is that programs written in them look like King Burniburiach's letter to the Sumerians done in Babylonian cuniform!
[...]One advantage of homoiconicity is that extending the language with new concepts typically becomes simpler, as data representing code can be passed between the meta and base layer of the program.
The abstract syntax tree of a function may be composed and manipulated as a data structure in the meta layer, and then evaluated.
Languages often considered to be homoiconic include: Lisp uses S-expressions as an external representation for data and code.
and takes the form of a word followed by a colon: The block can still be interpreted by using the do function provided in Rebol (similar to eval in Lisp).
It is possible to interrogate the elements of the block and change their values, thus altering the behavior of the code if it were to be evaluated: