lua-users home
lua-l archive

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


"Alex Queiroz" <asandroq@gmail.com> writes:

>      I don't know if I've understood your question very well, but in
> Scheme no live chains are collected, so there is no "replacing". You
> can even keep "moving" between all the chains, or "stacks". But for
> this to happen, you have to capture the chains you want and store them
> somewhere with call-with-current-continuation, aka call/cc.
>
>> (Are there any Googleable terms where I can go and read up on this? I did try
>> various keywords earlier, but the results were awfully fuzzy.)
>>
>
> "Scheme continuations", "call/cc", "call-with-current-continuation"

As a note aside: there is an interesting native implementation of
call/cc if I remember correctly: subroutines _never_ return.  Instead,
the call stack is garbage-collected&compacted together with the heap.
That way, the dynamic context stays alive as long as it is needed.

-- 
David Kastrup