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?

  • ipmonger@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    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.