2 ms·
Anyone who is used to coding in a Lisp with closures will be handicapped by a lambda that is just code without an environment. It only makes next to no differe
by kazinator 10y ago
Anyone who is used to coding in a Lisp with closures will be handicapped by a lambda that is just code without an environment.
It only makes next to no difference if you're writing Fortran in Lisp: just block scoped functions with parameters and locals, but no expectation of function indirection that carries environments.
You know, even Wirth's Pascal lets you at least pass a functional argument downward, with its lexical environment ("downward funarg")!
Lambdas with no environment can sort of fake downward funarg, if nothing is dynamically shadowed on the way down. I.e. (some-function (lambda () x)) If nothing in the activation chain inside some-function binds x between here and the point where the lambda is called, then we're good: the x dynamically resolves to our x. If something binds x, we have a bug. Or worse; we don't have a bug: it's set up that way on purpose.