2 ms·
I want to point out that "Homo-iconic" does not appear in SICP. But the concept is employed in the Meta-Circular Evaluator. Perhaps see: 4.1.5 Data as Progra
by so-cal-schemer 2mo ago
I want to point out that "Homo-iconic" does not appear in SICP.
But the concept is employed in the Meta-Circular Evaluator.
Perhaps see:
4.1.5 Data as Programs
https://sarabander.github.io/sicp/html/4_002e1.xhtml#g_t4_002e1_002e5 https://sarabander.github.io/sicp/html/4_002e1.xhtml#g_t4_00...
Another striking aspect of the evaluator is that it acts as a bridge between the data objects that are manipulated by our programming language and the programming language itself. Imagine that the evaluator program (implemented in Lisp) is running, and that a user is typing expressions to the evaluator and observing the results. From the perspective of the user, an input expression such as (* x x) is an expression in the programming language, which the evaluator should execute. From the perspective of the evaluator, however, the expression is simply a list (in this case, a list of three symbols: *, x, and x) that is to be manipulated according to a well-defined set of rules.
That the user’s programs are the evaluator’s data need not be a source of confusion. In fact, it is sometimes convenient to ignore this distinction, and to give the user the ability to explicitly evaluate a data object as a Lisp expression, by making eval available for use in programs. Many Lisp dialects provide a primitive eval procedure that takes as arguments an expression and an environment and evaluates the expression relative to the environment.
The difference is this is built in to many Lisps without the need to create a separate interpreter. And thus much more direct. It's definitional.
- eru 2mo agoThat part of SICP applies equally well to Haskell, which is not generally considered homoiconic.