[squeak-dev] Object>>is:

Igor Stasenko siguctua at gmail.com
Sat Feb 12 00:22:41 UTC 2011


2011/2/11 Levente Uzonyi <leves at elte.hu>:
> On Fri, 11 Feb 2011, Igor Stasenko wrote:
>
>> On 11 February 2011 20:23, Ricardo Moran <richi.moran at gmail.com> wrote:
>>>
>>> On Fri, Feb 11, 2011 at 3:29 PM, Igor Stasenko <siguctua at gmail.com>
>>> wrote:>
>>> (snip)
>>>>
>>>> you can do something like:
>>>>  World blahblah...
>>>> no?
>>>> I am sure, if you look deeply there is a way to iterate over all
>>>> submorphs
>>>> tree.
>>>
>>>
>>> I think you mean
>>> World>>#allMorphsDo:
>>> and in my experience it is *much* faster than iterating over all objects.
>>
>> sure it is faster, and besides you don't have to test for #isMorph
>> when iterating using it :)
>>
>> There is a lot of benefits of writing good OO code and separating
>> domains and operations applicable to
>> (sub)domains like clean undo history etc ..
>>
>> So yeah.. #is: is slower... so lets keep using #allObjectsDo: +
>> isMorph, because its faster. :)
>
> You're trying to twist my words, but to make it clear, I never said that.
> Read my previous mail why your idea doesn't work.
>

yes it was a sarcasm.

And some more:
what i have learned from this discussion is that using #allObjectsDo:
and #isXXX pattern is the way to
do programming in smalltalk.



>
> Levente
>
>>
>>
>>> Cheers
>>> Richo
>>>
>>
>>
>> --
>> Best regards,
>> Igor Stasenko AKA sig.
>>
>
>
>
>



-- 
Best regards,
Igor Stasenko AKA sig.



More information about the Squeak-dev mailing list