class method #initializeClass vs. #initialize

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

class method #initializeClass vs. #initialize

Ben Coman
I have come across a class method initializeClass with a comment "Do not
rename to #initialize."
Is that a generic concern ?

This particular case is from BaseUnit >> initializeClass from
http://www.squeaksource.com/Units.html

cheers, Ben
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: class method #initializeClass vs. #initialize

Bert Freudenberg

On 08.01.2012, at 06:21, Ben Coman wrote:

> I have come across a class method initializeClass with a comment "Do not rename to #initialize."
> Is that a generic concern ?

It is pretty unusual.

> This particular case is from BaseUnit >> initializeClass from http://www.squeaksource.com/Units.html


Generally you would name this method "initialize". This ensures it is automatically evaluated when loading the class.

- Bert -


_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners