Mantis - Squeak
Viewing Issue Advanced Details
3426 Kernel minor N/A 04-04-06 22:13 04-18-10 22:05
nicolas cellier  
nicolas cellier  
normal  
closed 3.9  
fixed  
none    
none 3.9  
0003426: init: method should be renamed initialize: for consistency
Pure indexable class implement new: as
    (self basicNew: n) initialize

And indexable-like (not declared as variableSubclass) do:
    (self basicNew) initialize: n

Except SharedQueue and Set and sons which do:
    (self basicNew) init: n

So i renamed the #init: method into #initialize: for consistency and uniformity
 Kernel-initMethodCleanUp.1.cs [^] (1,697 bytes) 04-04-06 22:13

Notes
(0004680)
nicolas cellier   
04-04-06 23:37   
Most #new: implementations can be factored in a single place:
Simply test for the behavior being indexable or not
and send one of the two initialize path:

Behavior>>new: n
    ^self isVariable
        ifTrue: [(self basicNew: n) initialize]
        ifFalse: [self basicNew initialize: n]

This costs only an additional test at each creation...
(0004831)
ducasse   
04-30-06 20:33   
in 39a-7027
(0004843)
ducasse   
05-02-06 20:55   
This change blocks Squeak completely when MC started to clean
(0013296)
nicolas cellier   
09-05-09 14:00   
This has been integrated in 3.9