How to port VW "Signal" to Squeak

Alan Lovejoy squeak-dev.sourcery at forum-mail.net
Wed Feb 21 07:37:32 UTC 2007


<Alejandro Martínez>
Hello. I'm trying to figure out how to port a #newSignal message send from a
VisualWorks application (something like Object informationSignal newSignal)
to Squeak, which lacks of Signal class. Does anybody know how to do it or
have a guideline for this? 
</Alejandro Martínez>
 
InformationSignal is simply a subclass of Exception. 
 
The message #newSignal simply answers a new instance of an
Exception--typically, an instance of the receiver, which would usually be
some subclass of Exception.
 
The messages and class names result from the fact that Exceptions in VW were
originally instance based, not class based.  If I remember correctly, it was
VisualWorks 1.0 (1990) that introduced Exceptions (instance based) to
Smalltalk, not just to the ParcPlace branch of Smalltalk.  Personally, I
find the instance-based implementation to be more elegant.  I strongly
dislike any design approach that results in an explosion of different
classes, none of which have behavior that significantly differs from that of
its cousins.  The upside of the class-based approach is simply that it makes
file-in/file-out of shared globals so easy. But I see that as a problem with
the infrastructure for managing globals, shared pools and namespaces, and
not as a good reason to use classes as heavyweight globals.
 
--Alan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20070220/9c325c67/attachment.htm


More information about the Squeak-dev mailing list