Newsgroups: comp.lang.scheme
Path: utzoo!sq!dak
From: dak@sq.sq.com (David A Keldsen)
Subject: Re: terminology question
Message-ID: <1990Aug22.082036.12725@sq.sq.com>
Organization: SoftQuad Inc.
References: <1466@tub.UUCP>
Date: Wed, 22 Aug 90 08:20:36 GMT
Lines: 45

net@tub.UUCP (Oliver Laumann) writes:

>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?

I'm not going to claim any absolute knowledge on this, and I haven't
been able to find a citation handy on whether these are up- or down-
wards continuations.  However, continuations with this property are
only possible in implementations where the "upwards funarg problem" has
been solved (more later on funargs).

>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?

Funarg is just a synonym for what we call a procedure in scheme, or a
closure in other languages, i.e. a code-environment pair.  It stands
for FUNctional ARGument.  The "funarg problem" is making sure that
a functional argument (i.e. a function used as an argument) gets
the right environment when applied.

"Upward funarg" means applying a function in an environment lexically
outside of where it is defined.  "Downward funarg" means applying a
function in an environment inside the environment where it was defined,
but "deeper."

The "upwards funarg" problem is a little tough because if the environment
is stored on a calling stack, it is *gone* when the function is left.
This is why siod, for example, doesn't support upward-funarg continuations...
the jumpbuf that it uses is *gone*, as it is on the C stack.  It is unable
to completely "capture" the continuation.

Regards,
Dak
-- 
// David A. 'Dak' Keldsen      dak@sq.com or utai[.cs.toronto.edu]!sq!dak
// "A loaf of bread, a jug of wine, a big TV with a hi-fi VCR and a nice 
//  stereo, a full fridge, a microwave, a UNIX system, two phone lines, 
//  a high speed modem, and thou."  --Omar the Software Engineer
