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

Re: Continuations

Michael Sperber <sperber@informatik.uni-tuebingen.de> writes:

> Scott> A binding is part of the state, right? 
> Not where I come from :-) But I guess that's a matter of terminology.

Here, I think, is the main source of confusion.  Folks like Michael
Sperber are saying "a continuation captures the state of the
computation".  Using a Turing machine model, they're thinking of those
little circles in the finite state machine, and not of the contents of
the tape.  But the word "state" covers more than just state machines.
Is the tape stateless or stateful?  When you say "a closure carries
state", aren't you talking about a binding?

The result is people imagining a lot of bindings being saved, which
makes for a confusing and incorrect mental model when you throw mutation
into the mix.

When you squint your eyes at continuations, so that you don't see saved
stacks, call chains, etc., they look an awful lot like GOTOs from BASIC.
Maybe the problem is that not enough people get exposed to BASIC before
they study continuations.