Re: An Acceptable Lisp
- From: Kaz Kylheku <kkylheku@xxxxxxxxx>
- Date: Wed, 27 Aug 2008 21:07:52 +0000 (UTC)
On 2008-08-26, Jon Harrop <jon@xxxxxxxxxxxxxxxxx> wrote:
Matthew D Swank wrote:
He also said:
"There should be a simple, easily implementable kernel to the Lisp. That
kernel should be both more than Scheme -- modules and macros -- and less
than Scheme -- continuations remain an ugly stain on the otherwise clean
manuscript of Scheme.
What's wrong with continuations?
Continuations are one of those features that, as a user, you will probably pay
for even if you don't use them.
Of course, I mean real, first-class, re-invocable, dynamic continuations: the
kind which capture the entire call stack, so that you can re-enter a previously
saved context, and then return through its entire call chain, which may
traverse separate compilation units.
This type of object is the only thing that is worthy of being called
``continuation'', but the distinction needs to be made because of lesser hacks
which are called continuations.
If you implement real continuations so that there is no cost to programs which
don't use continuations, the implementation will suck donkey dung for programs
that do use continuations.
The problem is that a separately-compiled module of code which calls other
modules will have to support being traversed by continuations even if it
doesn't actually use them. If it is compiled to use a regular stack for its
local variables (i.e. user doesn't pay for the continuation feature that isn't
being used), the creation of a continuation will become expensive; it will have
to go back and clone the entire stack.
Lexical closures don't have this problem. If you don't use them, you don't pay.
A function that doesn't close over anything can be compiled in a way that is
oblivious to lexical closures. If a parent function calls some external child
function that makes closures, that activity has no interaction with the parent
function.
.
- References:
- An Acceptable Lisp
- From: Vsevolod
- Re: An Acceptable Lisp
- From: Tamas K Papp
- Re: An Acceptable Lisp
- From: Tamas K Papp
- Re: An Acceptable Lisp
- From: Vsevolod
- Re: An Acceptable Lisp
- From: Matthew D Swank
- An Acceptable Lisp
- Prev by Date: Re: What do you LISPers think of Haskell?
- Next by Date: Re: An Acceptable Lisp
- Previous by thread: Re: An Acceptable Lisp
- Next by thread: Re: An Acceptable Lisp
- Index(es):
Relevant Pages
|