[closer-devel] Adding dynamic-wind to ContextL

Pascal Costanza pc at p-cos.net
Mon Dec 29 11:33:29 UTC 2008


On 28 Dec 2008, at 00:55, Tobias C. Rittweiler wrote:

> Pascal Costanza <pc at p-cos.net> writes:
>
>> (dynamic-wind
>>   (let ((*current-context* (cons something *current-context*)))
>>     (proceed
>>       some code)))
>>
>> The code that is captured by dynamic-wind will just be executed as
>> normal, but whenever a dynamic environment is reestablished that
>> captures this dynamic-wind, the code here is re-executed up until the
>> proceed form, which is then replaced with the continuation of
>> reestablishing that dynamic environment. Proceed is like a progn,
>> except that it marks the variable part of a dynamic-wind.
>
> I haven't fully wrapped my head around all this, but if it makes sense
> to nest DYNAMIC-WIND, I think DYNAMIC-WIND + PROCEED should be  
> lexically
> tagged like BLOCK + RETURN-FROM are.

OK, good point. I don't think this will actually never be needed, but  
it's no big deal implementing this either, so better be safe than sorry.

BTW, does anyone know what the most widely used continuation  
frameworks for Common Lisp are? I am aware of cl-cont and UCW.  
Anything else?

I would like to ask in their mailing lists what they think of the  
design and whether they think it's sufficient to combine it with their  
frameworks...


Pascal

-- 
Pascal Costanza, mailto:pc at p-cos.net, http://p-cos.net
Vrije Universiteit Brussel, Programming Technology Lab
Pleinlaan 2, B-1050 Brussel, Belgium












More information about the closer-devel mailing list