<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Apr 8, 2015 at 1:09 AM, Tobias Pape <span dir="ltr"><<a href="mailto:Das.Linux@gmx.de" target="_blank">Das.Linux@gmx.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Eliot<br>
<span class=""><br>
On 08.04.2015, at 09:56, Eliot Miranda <<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>> wrote:<br>
<br>
> Hi Tobias,<br>
><br>
> hasClassNamed: and symbols are to be preferred to avoid the cost of interning.<br>
<br>
</span>I don't quite understand that. When I use a symbol, it already has been interned,<br>
either during method-compilation or because I created it. How is interning avoided here?<br>
I thought this was the very reason to not pass a Symbol to hasClassNamed?<br>
What about its sibling classNamed: (or classOrTraitNamed:)?<br>
<span class=""><br>
> 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.<br>
<br>
</span>Right, I did not argue against that :)<br></blockquote><div><br></div><div>I misunderstood. So this discussion is just about the argument name? In any case I'm with Bert for using symbols to refer to class names whereever possible.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class=""><br>
> Your string position is understandable but needlessly expensive. The use of symbols (and the assumption that they're strings) is simple and efficient.<br>
<br>
</span>Don't get me wrong, I think that this assumption is worthwhile in (at least)<br>
Core Squeak, yes.<br>
<br>
Best<br>
<span class="HOEnZb"><font color="#888888"> -Tobias :)<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
><br>
> Eliot (phone)<br>
><br>
> On Apr 7, 2015, at 8:21 AM, Tobias Pape <<a href="mailto:Das.Linux@gmx.de">Das.Linux@gmx.de</a>> wrote:<br>
><br>
>><br>
>> On 07.04.2015, at 17:16, Levente Uzonyi <<a href="mailto:leves@elte.hu">leves@elte.hu</a>> wrote:<br>
>><br>
>>> What's wrong with #hasClassNamed:?<br>
>><br>
>> From my POV, it takes a String, and we wanted a symbol here ;)<br>
>> Also, I wanted t be conisten with #setUP<br>
>><br>
>>><br>
>>> Levente<br>
>>><br>
>>> On Tue, 7 Apr 2015, <a href="mailto:commits@source.squeak.org">commits@source.squeak.org</a> wrote:<br>
>>><br>
>>>> Tobias Pape uploaded a new version of EToys to project The Trunk:<br>
>>>> <a href="http://source.squeak.org/trunk/EToys-topa.123.mcz" target="_blank">http://source.squeak.org/trunk/EToys-topa.123.mcz</a><br>
>>>><br>
>>>> ==================== Summary ====================<br>
>>>><br>
>>>> Name: EToys-topa.123<br>
>>>> Author: topa<br>
>>>> Time: 7 April 2015, 2:37:32.593 pm<br>
>>>> UUID: 71b565ae-57ad-4d33-91d2-d6bfeec75490<br>
>>>> Ancestors: EToys-topa.122<br>
>>>><br>
>>>> the ifPresent: part needs a block argument<br>
>>>><br>
>>>> =============== Diff against EToys-topa.122 ===============<br>
>>>><br>
>>>> Item was changed:<br>
>>>> ----- Method: TileMorphTest>>expectedFailures (in category 'testing') -----<br>
>>>> expectedFailures<br>
>>>><br>
>>>> ^ super expectedFailures,<br>
>>>> (self class environment<br>
>>>> at: #BaseSoundSystem<br>
>>>> + ifPresent: [:e| #()]<br>
>>>> - ifPresent: [#()]<br>
>>>> ifAbsent: [#(testSoundTile) "Only this test depends on Sound"])!<br>
<br>
<br>
<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">best,<div>Eliot</div></div>
</div></div>