About KCP and automatic initialize

Ned Konz ned at bike-nomad.com
Wed Sep 17 16:41:30 UTC 2003


On Wednesday 17 September 2003 09:23 am, ducasse wrote:
> my gut feeling tells me that initialize is better because this is
> used. 

I think that was exactly the reason Richard was suggesting that we not 
use it. By not using #initialize (which may not always be appropriate 
to call in this case, given the existing code) we don't run the risk 
of breaking things.

Since #initialize had no specific meaning previously (despite its use 
in some places in the 'new initialize' pattern, we can't safely use 
it with your proposed change.

> Look at initializeInstance nobody uses it.

If you mean #initializedInstance, I use it all the time from the 
Browser:
- select a class
- menu; choose 'more', 'sample instance'

If you mean #initializeInstance, that's a good name for the new 
pattern:

Behavior>>new
	^self basicNew initializeInstance; yourself

Object>>initializeInstance
	^self

> > What do you think of this idea? We could still go through the
> > code and clean up existing (mis) uses of the initialize patterns.
>
> This was my idea.
>
> Stef

-- 
Ned Konz
http://bike-nomad.com
GPG key ID: BEEA7EFE



More information about the Squeak-dev mailing list