lua-users home
lua-l archive

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


On 11/12/09, David Given <> wrote:
>  I know Lisp has these, but my Lisp-fu is very weak. I don't know of any
>  other languages (Smalltalk has sanitised continuations in that you can
>  return from a method from a block defined inside that method, but only
>  while the method is actually active, IIRC). I do know that you need
>  really high-tech garbage collectors to make them at all efficient (which
>  of course Lisp did).

     Early Scheme implementors assumed that all call frames should go
to the heap to allow first-class continuations. But in the early 80's
this was proven wrong and the call frames moved to a true stack. At
first the stack had to be copied to the heap at each continuation
capture, but since them several better algorithms were devised. My own
compiler uses a full stack copy.