Wed Sep 9 13:49:24 CEST 2009

Environment / Continuation vs. Param stack / Return stack

The analogy doesn't hold, but there is some relation..  Can this be
made more precise?  The explanation could be centered around the
following observation.

In a concatenative language, there is no `lambda' to introduce new
functional abstractions closed over a surrounding lexical environment.
However, in a concatenative language it is possible to do something
similar using the quotation-equivalent of `cons', `list' and `append'.

More precisely, in a concatenative language one can take two quoations
and `compose' them, and one can take a data item and turn it into a
quotation that will reproduce it.

In some sense, `lambda' performs a `cons' of code and environment.
With a bit of a stretch of imagination, one could then see a data
stack as an environment, and a quotation as a code body containing
free variables.