Where does "class new" come from?
hmm at heeg.de
Tue May 16 17:48:49 UTC 2006
Torsten Sadowski wrote:
>this might be a stupid question but where does the "new" class method come
>from for object instantiation because I could find it neither in Object
>nor in ProtoObject. I just wanted to find out where "initialize" is called
>and what else might be done at object creation but now I'm completely
All class objects inherit from Class, ClassDescription, Behavior.
So if you inspect "String class withAllSuperclasses" you'll find the
complete inheritance chain.
Behavior is where the #new method is implemented. This class basically
defines the low-level stuff that's needed to describe and create instances.
ClassDescription, Class and Metaclass add stuff to organize classes and
methods, and to create the metaclass system of Smalltalk.
More information about the Squeak-dev