Path: utzoo!attcan!uunet!cs.utexas.edu!sdd.hp.com!decwrl!ucbvax!bloom-beacon!aiai.edinburgh.ac.UK!jeff From: jeff@aiai.edinburgh.ac.UK (Jeff Dalton) Newsgroups: comp.lang.scheme Subject: Re: terminology question Message-ID: <28101.9008201848@subnode.aiai.ed.ac.uk> Date: 20 Aug 90 18:48:24 GMT Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 37 > One point that distinguishes Scheme's continuations from Classic Lisp's > "catch" is that a continuation can be used "jump into" a function that > has already returned (i.e. that is not currently "active"). > > What is this property of a continuation called? In an earlier article > it has been referred to as "upward funargs", but I have also seen > "downward continuations" as well as "upward continuations". Which is > the correct term? People often say "first class continuations", but I think something more is required to show they are recallable. (Ie, after it's been called once, either explicitly or inplicitly by a normal return, it can be called again.) > I have already heard the "upward/downard funargs" thing in other > contexts. What is the etymology of this term (probably a question for > the Lisp "oldtimers"), and what exactly does it mean? A "funarg" is a functional argument. It's also a data structure. In order to get lexical scoping, a function object has to contain an environment. In Lisp 1.5, this was accomplished by having the value of (FUNCTION f) be (FUNARG f a-list), where f was usually a lambda- expression and a-list was the environment. Later, for example in MacLisp, it was decided that maintaining an a-list was too expensive and so some less general tricks were used instead. In particular, if variable values were kept on a stack (or a stack was used for the old values in shallow binding), a function that was going to be passed as an argument to another function (rather than be returned) required only a pointer to the stack as an environment. In MacLisp, (*FUNCTION f) evaluated to (FUNARG f stack-pointer). This trick worked only in the downward direction, hence "downward funarg". An "upward funarg" was one that could be returned "up" to a caller. -- Jeff