About KCP and automatic initialize

Richard A. O'Keefe ok at cs.otago.ac.nz
Thu Sep 18 02:49:05 UTC 2003


"Andreas Raab" <andreas.raab at gmx.de> wrote:
	Its name is the single most important thing there is.

	We want to educate existing users and therefore we have to adopt
	(and partly change) existing patterns.

If you are happy with "(and partly change)", then why are you so unhappy
about a change to a method name?

If you keep the existing name, you aren't *changing* an existing pattern,
you are *breaking* it.

	Those patterns center around the use (or abuse) of initialize -
	everything else would be just Another Useless Selector (tm)
	which I would strictly oppose.

If the code is currently working, it is not an abuse.  You don't own
the name #initialize, the people who have been using it do.  Nothing
gives you the right to say "hey you thickheads who wrote working code,
you thought you knew what initialize meant but I'm a god and I tell you
you are WRONG and your code is going to BURN".  I know that's not what
you mean to say, but it's sure as heck what it sounds like on the
receiving end.

	The new/initialize pattern makes only sense if it is used for
	all of the existing and future code people get to see when they
	look at Squeak.

But it *can't* be used for all of the existing code; existing code
that uses super new initialize relies on #new *not* sending #initialize.

Seriously, you are talking about breaking an unknown and probably large
amount of code, owned by people who have never heard of you and never taken
part in these discussions (I mean students, here), when there is a trivial
fix to your change that would prevent this.  Whatever else you call this,
it isn't good manners.

	Otherwise it's completely and utterly pointless
	- if you don't want to change people's habits why make the
	change at all?

Are you saying that you *can* teach people to use #initialize but you
*can't* teach people to use #initialiseYourself?  What is it about the
name #initializeYourself that makes it impossible for people to change
their habits to use that?

It begins to sound as though you mean "change people's habits" in a
bad way, that breaking existing working code is not a regrettable
side effect of the change, but the very point of it.  Do you really
want to punish people who don't think about #initialize the way you do?
Do you really think you have the right to punish them for writing working
code that doesn't work the way you want?  What are you going to punish
them for next?

We've had a fair about of discussion about deprecation recently.

You could change people's habits perfectly well without unilaterally
breaking their code and then expecting them to repair the rubble.

Step 1: introduce #intializeYourself.
Step 2: make the system treat all definitions of #initialize 
        as deprecated.

On the question about whether the proposed pattern (#new sends some
initialisation message) is a good one or not, people can differ, and
there's rather more agreement about the motives (making life easier
for people learning the language, simplifying use, &c) than might have
appeared at first sight.

But it is quite outrageous to deliberately break people's code in order
to change their habits from a habit that used to work to a habit that you
(but not they!) happen to prefer.



More information about the Squeak-dev mailing list