[squeak-dev] Object>>is:
Igor Stasenko
siguctua at gmail.com
Fri Feb 11 20:03:48 UTC 2011
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. :)
> Cheers
> Richo
>
--
Best regards,
Igor Stasenko AKA sig.
More information about the Squeak-dev
mailing list
|