[Newbie] Morph class>>new
Cees de Groot
cg at cdegroot.com
Wed Apr 16 11:51:18 UTC 2003
On Wed, 2003-04-16 at 01:03, Richard A. O'Keefe wrote:
> new
> ^self basicNew initialize
> initialize
> "do nothing"
>
> then many classes would not need to define #new at all.
>
Exactly my idea. The only counter argument so far seems to be
performance - the extra 'dummy' message send to 'initialize' on instance
creation for *every* object, which is assumed to be expensive but
appears to be acceptably cheap.
Personally, I would vote pro this cleanup. If people find a case where
they don't want it (for performance reasons or whatever), they're free
to override this sensible default.
-------------- 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/20030416/f6640b33/attachment.pgp
More information about the Squeak-dev
mailing list
|