[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Date: Mon, 11 Apr 88 13:35:53
X-Date-Last-Edited: 1988 April 11 13:35:53 PDT (=GMT-7hr)
X-Date-Posted: 1988 April 11 13:38:04 PDT (=GMT-7hr)
From: Robert Elton Maas <cernvax!mcvax!SAIL.Stanford.EDU!REM@IMSSS>
<M> From: mcvax!pilatus!ceb@uunet.UU.NET
I nominate using BBN/UCI-lisp editor terminology here, namely "embed".
CONS and LIST are embedding functions.
. . .
terminology, namely "extract". CAR and NTH (in regard to its list
argument) are extracting functions.
(:- Or cut off their damn heels :-)
(N.B. That's from a comedy album played on KFAT dealing with chain saw.)
In this case of LetRec, have low-level mechanism (part of LetRec) pass a
dummy forwarding cell, evaluate normally, then after return more
low-level LetRec mechanism do the replacement for the true value to
create circularity. This localizes the implementation work to LetRec
itself, not random functions such as CONS, thus it can be done outside a
Scheme-style lazy-evaluator within a normal evaluator.
Now that you mention chain saws, it occurs to me that you really don't
have to declare a special class of functions at all. If what you
meant above was something like:
"Whenever a reference occurs to a structure chunk that
occurs elsewhare in the structure, you substitute in place a
forwarding cell, and then as you exit the letrec context, you
go through and replace al of these forwarding cells (which you have
kept around in a list) with their true references, then . . .
*Should you make a such a reference inside an non-embedding or
extracting function, then as your forwarding cell tries to
work its way through the offending procedural filter before
you exit, then you will get a "Warning: non-numeric argument
passed to (whatever)"."
(Its just like trying to pass something which won't cut through a
circular saw => it jams).
Otherwise, it seems you've got the idea well framed.
[But then again, all this is probably inside that 1980 ACM article
Steele mentioned as well; wheels tend to get reinvented.]
Ps. Glad to see KFAT back.