About KCP and automatic initialize

Richard A. O'Keefe ok at cs.otago.ac.nz
Wed Sep 10 04:14:13 UTC 2003


This topic has been discussed before.

I have a lot of sympathy for it, BUT
one of the standard beginner (and not-so-beginner) complaints about
Squeak is the documentation.  (Yes, there is a lot of documentation.
It's all over the place, it's often hard to know where to look, and
up-to-date is not a phrase one could honestly use to describe it all.)
Where do you turn?  Well, there are all those free Smalltalk books.

What happens if you break with the past so violently in something
as basic as how you create an object?  What use are the Smalltalk books
going to be to beginners who can't even trust them to be applicable to
Squeak in such a basic way?

The ANSI Smalltalk standard says nothing about any #initialize method
being called by #new; there is no #initialize in Object.

If you just want to make life easier for people constructing new
classes,

    Object subclass: #AutoInitObject
      methods
        initialize
          ^self
      class methods
        new
          ^super new initialize

and then people can make subclasses of AutoInitObject instead of Object.
So we don't _need_ any change to the kernel classes to get most of the
benefit, and we'd lose far too much in the way of applicable documentation
(books, tutorials, examples) and existing code if such a change were made
to Object.



More information about the Squeak-dev mailing list