Semantics of Set>>new in Squeak 3.9 -- To initialize or not to

Andreas Raab andreas.raab at gmx.de
Thu Apr 6 00:51:55 UTC 2006


Wolfgang Helbig wrote:
> If I am not mistaken, classes that are defined as variableSubclass in ST-80 are 
> defined as subclass in Squeak. Is this a tendency of modern Smalltalk systems. 
> And if so, why?

Because ST-80 used an object table which makes #become: a very fast 
operation and many newer (not necessarily more "modern") variants use 
direct pointer models which makes #become: a very slow operation. If 
#beome: is fast, using indexed subclasses is more efficient (less space 
overhead, potentially faster because of the lack of an extra 
indirection) whereas if #become: is slow you really want to store the 
array data in an instance variable instead (so you can copy the array if 
it needs to grow/shrink).

Cheers,
   - Andreas





More information about the Squeak-dev mailing list