[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Paul Graham <paulgraham@yahoo.com>] Re: What is alightweight language
Title: Re: [Paul Graham <paulgraham@yahoo.com>] Re:
What is a
At 12:38 PM -0500 12/14/01, John Clements wrote:
At 10:17 AM -0500 12/14/01,
jmarshall@mak.com wrote:
There is no need for the escape
continuation.
(define (andmap fn list)
(or (and (pair? list)
(fn (car
list))
(andmap
fn (cdr list)))
(null? list)
(error "Improper
list.")))
I don't mean this as a nitpick. I find it extremely rare that I
need
to use call-with-current-continuation
because CPS doesn't cut it.
Well, I agree that I picked a dreadful
example; no context is built up. If I understand you correctly,
you're suggesting either
a) a global CPS rewrite performed by you,
the author or all your code, or
b) a local CPS rewrite of the kind that
you demonstrate above.
If the former, I don't see how you can
build large systems this way. If the latter, your uses of
call/cc have shrunk to being able to escape from a recursive procedure
which calls only leaf procedures. That is, you don't have the ability
to 'abort' parts of the evaluation context which you didn't
create.
john clements
Let me also respond to my own posting to agree with you: as
others have said, I find it extremely rare that I need to use call/cc
at all, and hence I would have to agree with you that the
number of cases in which I need to use call/cc because CPSing doesn't
work is small. That is, if the set B is small, it's true that some
subset of B is also small.
john