[squeak-dev] The Trunk: EToys-topa.123.mcz

Eliot Miranda eliot.miranda at gmail.com
Wed Apr 8 07:56:53 UTC 2015


Hi Tobias,

     hasClassNamed: and symbols are to be preferred to avoid the cost of interning.  The class name keys are, as they should be, symbols, and we don't want to pay the cost of interning to do that lookup.  And I agree with Levente that symbols are searched for when SystemNavigation is used to find such soft class references.  Your string position is understandable but needlessly expensive.  The use of symbols (and the assumption that they're strings) is simple and efficient.

Eliot (phone)

On Apr 7, 2015, at 8:21 AM, Tobias Pape <Das.Linux at gmx.de> wrote:

> 
> On 07.04.2015, at 17:16, Levente Uzonyi <leves at elte.hu> wrote:
> 
>> What's wrong with #hasClassNamed:?
> 
> From my POV, it takes a String, and we wanted a symbol here ;)
> Also, I wanted t be conisten with #setUP
> 
>> 
>> Levente
>> 
>> On Tue, 7 Apr 2015, commits at source.squeak.org wrote:
>> 
>>> Tobias Pape uploaded a new version of EToys to project The Trunk:
>>> http://source.squeak.org/trunk/EToys-topa.123.mcz
>>> 
>>> ==================== Summary ====================
>>> 
>>> Name: EToys-topa.123
>>> Author: topa
>>> Time: 7 April 2015, 2:37:32.593 pm
>>> UUID: 71b565ae-57ad-4d33-91d2-d6bfeec75490
>>> Ancestors: EToys-topa.122
>>> 
>>> the ifPresent: part needs a block argument
>>> 
>>> =============== Diff against EToys-topa.122 ===============
>>> 
>>> Item was changed:
>>> ----- Method: TileMorphTest>>expectedFailures (in category 'testing') -----
>>> expectedFailures
>>> 
>>>    ^ super expectedFailures,
>>>        (self class environment
>>>            at: #BaseSoundSystem
>>> +            ifPresent: [:e| #()]
>>> -            ifPresent: [#()]
>>>            ifAbsent: [#(testSoundTile) "Only this test depends on Sound"])!
> 
> 
> 


More information about the Squeak-dev mailing list