[squeak-dev] Scheme continuations vs Squeak continuations

Stéphane Rollandin lecteur at zogotounga.net
Fri Jan 30 19:37:48 UTC 2009


Julian Fitzell a écrit :
> I'm assuming this is caused by Squeak's lack of full block closures.
> 
> Does it work if you make "y" an instance variable instead of a local?
> 
> Julian


actually, trying the following does work in a workspace or a method:

| y |
y _ Continuation currentDo: [:c | c].
Transcript show: 1.
Continuation currentDo: [:c | y value: c].
Transcript show: 2.
Continuation currentDo: [:c | y value: c].
Transcript show: 3.


so the problem occurs when y is an instance variable, while it works 
fine with a local variable (although if you try the code above in a 
workspace without declaring the | y | in the first line, it fails)


Stef




More information about the Squeak-dev mailing list