Ways of new

Anthony Adachi adachipro at yahoo.com
Tue May 6 05:03:18 UTC 2003


Hello

Looking at various examples of Smalltalk code I've
noticed a couple of different ways to override new
which are commonly used.

One sends self the basicNew message...

Whale >>new
^self basicNew initialize

The other sends super the new message...

Dog >> new
^ super new initialize

Why is one implementation chosen over the other by
some authors? 

Thanks,

Anthony

__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com



More information about the Squeak-dev mailing list