On 26 August 2012 17:55, Levente Uzonyi <[email protected]> wrote: > On Sun, 26 Aug 2012, Frank Shearar wrote: > >> That sounds like a reasonable workaround to address Mariano's >> immediate problem :) > > > I don't see what other issues are there to solve. :)
Then you should go reread my article, and the articles it references :) Both have examples of how undelimited dynamic variables don't work sensibly with delimited continuations. Kiselyov goes further and shows how they _cannot_ work sensibly. Serialising a running process implicitly creates a delimited continuation. Ergo, Fun Times! frank > Anyway, here's a highly > untested example of what I had in my mind: > http://leves.web.elte.hu/squeak/StackSerializableDynamicVariable.st Yep, using resumable exceptions to implement delimited dynamic variables. That's exactly what Control does, only without DynamicVariable necessarily polluting the global namespace. > Is uses a method in Process which is not present in current images: > > environmentAt: key ifAbsentPut: aBlock > > ^(env ifNil: [ env := Dictionary new ]) at: key ifAbsentPut: aBlock. Current _Pharo_ images, maybe. I'm pretty sure I looked at a trunk image with it in the last few hours (but obviously am too lazy to actually go check :/) frank > Levente >
