The State of Exceptions (corrected)
Allen Wirfs-Brock
Allen_Wirfs-Brock at Instantiations.com
Tue Oct 20 04:45:17 UTC 1998
Oops, there was one more thing I forget to mention. You also need to copy
the current activation stack at the time the continuation is created and
reinstall a copy of this stack when the continuation is evaluated. Not
pretty, but it worked.
Allen Wirfs-Brock
At 08:59 PM 10/19/98 -0700, Allen Wirfs-Brock wrote:
>At 12:30 PM 10/19/98 -0400, Vassili Bykov wrote:
>>Ralph E. Johnson wrote:
>>>
>>> A block with a return in it is what I was thinking of
>>> as a continuation. A block is a first-class object.
>>
>>Sheldon probably means unlimited extent continuations as in Scheme. A while
>>ago, I posted a longish message on c.l.s. about imitating continuations
>>using thisContext, it should be at
>><http://www.dejanews.com/getdoc.xp?AN=275292411>. In a nutshell, you can
>>come fairly close remaining at the image level. ...
>
>Many years ago I built an experimental image level implementation of
>continuations using the Tektronix version of Smalltalk-80. It was quite
>straight forward. Points to consider:
> a block of the form [:x| ^x] is almost a continuation. ST-80 problems are:
> x is not local to the block.
> multiple returns are not allowed so:
> 1) encapsulate the block in another object. That object serves as the
>continuation object
> 2) when the continuatiuon object is "evaluated" (via a message) do the
>following:
> a) make a copy of the encapsulated block
> b) do a fixTemps on the copy
> c) send value: to the copy
>
>The copy and fixTemps took care of the short comings of the contexts and I
>was able to
>to all the classic scheme style continuation tricks.
>
>Allen Wirfs-Brock
>
>
More information about the Squeak-dev
mailing list
|