[squeak-dev] The Trunk: Kernel-cmm.821.mcz

Chris Muller asqueaker at gmail.com
Tue Nov 26 20:23:32 UTC 2013


Numbers are not any more mutable than Points or Dates.  They're all
Value objects, regardless whether they're a Smalltalk immutable.

Even so, that's irrelevant to this change anyway because #veryDeepCopy
is about enabling the Prototype pattern.  The inherited implementation
from Object is way overkill and way too slow for Numbers.

PS -- I even do the same for Strings in my own personal
core-extensions library, which I think belongs in trunk too.

On Tue, Nov 26, 2013 at 12:02 PM, Levente Uzonyi <leves at elte.hu> wrote:
> On Tue, 26 Nov 2013, commits at source.squeak.org wrote:
>
>> Chris Muller uploaded a new version of Kernel to project The Trunk:
>> http://source.squeak.org/trunk/Kernel-cmm.821.mcz
>>
>> ==================== Summary ====================
>>
>> Name: Kernel-cmm.821
>> Author: cmm
>> Time: 26 November 2013, 10:24:26.281 am
>> UUID: 591c1ede-81bc-40d7-8591-af7fe29b2bd5
>> Ancestors: Kernel-fbs.820
>>
>> - Don't let Boolean and Number inherit Object's really slow #veryDeepCopy.
>
>
> Some Numbers are mutable objects, so this doesn't sound right.
>
>
> Levente
>
>
>>
>> =============== Diff against Kernel-fbs.820 ===============
>>
>> Item was added:
>> + ----- Method: Boolean>>veryDeepCopy (in category 'copying') -----
>> + veryDeepCopy
>> +       "Overridden for performance to avoid #fixDependents."
>> +       ^ self!
>>
>> Item was added:
>> + ----- Method: Number>>veryDeepCopy (in category 'private') -----
>> + veryDeepCopy
>> +       "Overridden for performance."
>> +       ^ self!
>>
>>
>>
>


More information about the Squeak-dev mailing list