[Newbie] Morph class>>new

Stephane Ducasse ducasse at iam.unibe.ch
Tue Apr 15 12:40:26 UTC 2003


>
> An Example of what I mean:
> It says in the Squeak-code:
> Morph class>>new
>   ^super new initialize
>
> Morph is a subclass of Object. If someone picked up the proposal of 
> Stephane
> to initialize all objects, and e.g. inserted a:
> Object class>>new
>   ^super new initialize
> into the image, then:
> Morph new openInWorld
> would twice initialize the Morph.


sure but with my proposal we should not have duplicated everywhere 
super new initialize :) so no double initialize call. This is the idea 
at the end.

> This would not happen if Morph used:
> self basicNew initialize
>
> Is that wrong?
Prof. Dr. Stéphane DUCASSE
http://www.iam.unibe.ch/~ducasse/
  "if you knew today was your last day on earth, what would you do 
different? ...  especially if,
  by doing something different, today might not be your last day on 
earth" Calvin&Hobbes

"The best way to predict the future is to invent it..." Alan Kay.

Open Source Smalltalks: http://www.squeak.org, 
http://www.gnu.org/software/smalltalk/smalltalk.html
Free books for Universities at 
http://www.esug.org/sponsoring/promotionProgram.html
Free Online Book at 
http://www.iam.unibe.ch/~ducasse/WebPages/FreeBooks.html



More information about the Squeak-dev mailing list