[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: a rehash of the question of optimizing some prompt ideoms

From: Mark H Weaver
Subject: Re: a rehash of the question of optimizing some prompt ideoms
Date: Sat, 31 Aug 2013 00:56:41 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Mark H Weaver <address@hidden> writes:

> Hi Stefan,
> Stefan Israelsson Tampe <address@hidden> writes:
>> Delimeted continuations can be looked upon as a generalization of
>> common lisps tagbody e.g. it's trivial to produce tagbody semantics
>> with the help of prompts.
> I haven't yet digested the rest of your email, but I wanted to point out
> that prompts are not needed to produce Common Lisp 'tagbody' semantics.
> All that's needed is a set of mutually-recursive local procedures that
> tail call each other.  Each local procedure corresponds to a label, and
> the tail calls correspond to GOTOs.
> In fact, one of the earliest papers on Scheme, "LAMBDA, The Ultimate
> Imperative" published in 1976, showed how to convert arbitrary Lisp
> 'PROG' forms into a very early version of Scheme.  Note that Lisp 'PROG'
> was a combined 'let', 'block', and 'tagbody', and can do everything that
> Common Lisp's 'tagbody' can do.

Ugh.  I just realized that this is not true, because of the fact that
Common Lisp added lexical scoping and the ability to use 'go' to escape
from procedures nested within the 'tagbody'.  Indeed, Common Lisp's
'tagbody' is more powerful than old Lisp's PROG, and apparently needs
escape-only continuations in the general case.

Sorry for the wasted bandwidth :-(


reply via email to

[Prev in Thread] Current Thread [Next in Thread]