[Newbie] Morph class>>new

Cees de Groot cg at cdegroot.com
Tue Apr 15 12:55:27 UTC 2003


On Tue, 2003-04-15 at 10:53, Christian Hofer wrote:
> would twice initialize the Morph. This would not happen if Morph used:
> self basicNew initialize
> 
> Is that wrong?
> 
I've been wondering about this myself. Everywhere I look, I see 'super
new initialize', while I think that 'self basicNew initialize' really is
a cleaner way. In fact, I think 

Object>>new
	^self basicNew initialize

should be in the image. The initialize methods themselves usually know
best whether a 'super initialize' needs to be done. I use 'self basicNew
initialize' exclusively and I'm quite happy with it, but the fact that I
see so much code with 'super new initialize' makes me wonder - is there
something wrong with 'self basicNew initialize'?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20030415/d02d1302/attachment.pgp


More information about the Squeak-dev mailing list