[squeak-dev] Implementing control operators

Ralph Johnson johnson at cs.uiuc.edu
Thu Apr 14 03:20:46 UTC 2011


On Wed, Apr 13, 2011 at 5:42 PM, Frank Shearar
<frank.shearar at angband.za.org> wrote:

> But I suppose I'm really asking this: is it _necessary_ to use primitive
> 199, or could one in _principle_ implement exception handling solely by
> in-image stack manipulation?

Yes, you can implement exception handling by normal Smalltalk code,
without any special primitives.   Primitives make it go faster, and
they are necessary to trap blocks that leave your exception handler,
but the first dozen exception handling packages in Smalltalk (and
before the ANSI standard there are a lot of incompatible exception
handling systems for Smalltalk) all did it without primitives.

-Ralph Johnson



More information about the Squeak-dev mailing list