this post was submitted on 21 Nov 2023
1 points (100.0% liked)

Lisp

53 readers
3 users here now

founded 1 year ago
MODERATORS
 

In the eval function of chapter 4 we have different eval-foo...s, which deal with the special syntax. Why the apply function is not just part of eval function. So we could have some dispatch condition in case analysis such as ...((application? exp) (eval-application exp env))... . Why do we make it harder?

you are viewing a single comment's thread
view the rest of the comments
[–] ipmonger@alien.top 1 points 1 year ago

Can you help me understand your line of thought better?

In 4.1 The Metacircular Evaluator, they point out that it is an implementation of the environment model of evaluation from 3.2. Note that model has two components: eval and apply. Eval gets used much more often than apply, so it doesn't make sense to make eval a component of apply. Apply, on the other hand, works on already evaluated components.