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

Re: What is a lightweight language



> The one thing I don't like about call/cc is the
> sneaking suspicion that there may be a
> pay-even-if-you-don't-use-it cost associated with
> it.  I don't know how much this cost is a factor in the
> Scheme impls of today [1], and I suspect the answer to
> this question should be of some interest to the other
> language communities here that are considering
> including call/cc but want to do the fast thing.

We left call/cc out of Dylan (after debate, and to the continuing [friendly,
I think] enragement of Schemers) because:

- There wasn't a known way to implement upwards continuations without
incurring a performance penalty even in code that didn't use them.  A 5%
penalty may sound small to some, but we were shooting for within 10% of C
speed, and dynamic types make this hard enough with another 5% chunk out of
your budget.  C compiler writers spend long months eking out another 1%, and
C compiler users (application writers) spend hours or days on the same task.

- We couldn't figure out a way to make it possible to express downwards but
not upwards continuations or otherwise make it easy to use one without
leading our target audience (sophisticated application developers) towards
traps.

- The only reasons the pro-continuation camp had for including them were to
implement threads (we instead wanted threads that were integrated with the
OS's threads --- a post facto mistake in light of today's demands for
microthreads, but a good idea at the time), exception handlng (which was
native in Dylan), generators (figured we could live without), and cool
mindblowing research experiments (for which we agreed not to remove Scheme
from the face of the earth).