About KCP and automatic initialize

Stephen Pair stephen at pairhome.net
Tue Sep 16 15:04:26 UTC 2003

Sorry if this has already been suggested (I haven't been able to keep up 
with this thread), but what about having a prototypical instance 
associated with each class?  New instance creation would happen by 
cloning that prototypical instance (which would already have its  
instance variables defaulted to whatever is required).  Further 
initialization that needs to happen on an instance by instance basis 
could happen by overridding the #clone method (or some other clone-like 
method used for instance creation).  Of course, this wouldn't work for 
variably sized object, but you could probably fake it in some way.

- Stephen

More information about the Squeak-dev mailing list