<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jul 4, 2016 at 1:59 PM, 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"><span class=""><br>
On 04.07.2016, at 22:44, Eliot Miranda <<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>> wrote:<br>
<br>
> Hi All, Hi Marcel,<br>
><br>
> when I see code like this, and there's a lot of it in Morphic,<br>
><br>
> !Flaps class methodsFor: 'testing' stamp: 'mt 5/17/2016 14:17'!<br>
> anyFlapsVisibleIn: aWorld<br>
><br>
> aWorld submorphsDo: [:m |<br>
> (m isKindOf: FlapTab) ifTrue: [^ true]].<br>
><br>
> ^ false! !<br>
><br>
> I think this is performance thrown on the floor (isKindOf: is awfully slow, especially in huge hierarchies like Morphic, and bad design, restricting one to a concrete class). And I think that Morph provides a perfect place to put an extension that doesn't pollute Object. So I would like to see<br>
><br>
> anyFlapsVisibleIn: aWorld<br>
><br>
> aWorld submorphsDo:<br>
> [:m| m isFlapTab ifTrue: [^true]].<br>
> ^ false! !<br>
><br>
> with the emphasis on isFlapTab ;-)<br>
<br>
</span>Well, class testing seems to be a Morphic pattern, given #findA: (alias #submorphOfClass:)<br></blockquote><div><br></div><div>I don't care. It's *WRONG*. isKindOf: is a _bug_.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
Best regards<br>
<span class="HOEnZb"><font color="#888888"> -Tobias<br>
</font></span>PS: Not advocating anything just reporting what I found<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><span style="font-size:small;border-collapse:separate"><div>_,,,^..^,,,_<br></div><div>best, Eliot</div></span></div></div></div>
</div></div>