In the
letex case, when eval is ready to evaluate the
(+ x y) form, all it "sees" is
(+ 2 3) because
letex has already macroexpanded the
(+ x y) form.
In the
let case, when eval is ready to evaluate the
(+ x y) form, all it "sees" is
(+ x y), and then it must evaluate
x and
y based on the current (dynamic) bindings of
x and
y to find the respective values.
It may sound strange, but there are times when you want to expand a form before eval sees it. Sort of like a double-eval, but in the first round (expansion with
letex) you get to choose what parts of the target form get evaluated (expanded), and then eval looks at the expanded form (pre-processed, if you will) and proceeds to do its job on that.
If I wasn't clear on this, BTW, (1) it's my fault and (2) there is good news in that Lutz has written a nice example of when you might use
letex. See his example
make-adder function at
http://www.newlisp.org/downloads/newlis ... html#letex.
(λx. x x) (λx. x x)