[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Paul Graham <paulgraham@yahoo.com>] Re: What is alightweight language
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