[Newbie] Morph class>>new
Jon Hylands
jon at huv.com
Tue Apr 15 13:06:32 UTC 2003
On 15 Apr 2003 14:55:27 +0200, Cees de Groot <cg at cdegroot.com> wrote:
> 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 general, I try and avoid calling #basic... methods from my code, unless
I really have to. The purpose of #basic... methods is so that subclasses
should not override them, so subclasses can, in certain situations, ignore
superclass protocol and do things a certain way.
To put it simply, I don't use #basicNew (unless I have to) for the same
reason I don't access Arrays using #basicAt: (unless I have to) -- it seems
like a bad practice.
Later,
Jon
--------------------------------------------------------------
Jon Hylands Jon at huv.com http://www.huv.com/jon
Project: Micro Seeker (Micro Autonomous Underwater Vehicle)
http://www.huv.com
More information about the Squeak-dev
mailing list
|