<div dir="ltr">Totally. Also, one might argue that switching on type isn&#39;t terribly object-oriented. Or rather, it sort of re-implements dispatch. Sometimes it&#39;s hard to avoid, but some hard things are worth doing. Of course I&#39;m a big fat hypocrite once in a long while (DNU hacks, #isKindOf:, etc.)<div>
<br></div><div>#respondsTo: is nicer in some spots. Protocol isn&#39;t class. Etc.<br><div><br></div><div>+1</div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Aug 31, 2013 at 7:39 PM, tim Rowledge <span dir="ltr">&lt;<a href="mailto:tim@rowledge.org" target="_blank">tim@rowledge.org</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">There are 623 senders of isKindOf: in the 4.5 image I&#39;m using right now - which may be more than the general because I have some extra stuff loaded - and I&#39;d bet that there are no more than a dozen places where it is actually a sensible way of doing what is needed.<br>

<br>
It&#39;s slow - it scans up a class tree.<br>
It&#39;s ugly.<br>
It isn&#39;t actually testing what a lot of people seem to think - if you want to find out is some object can handle a certain capability try actually asking with something like  #isAGraphicThing rather than (isKindOf: Morph) or:[ foo isKindOf: DisplayObject] blahblahblah.<br>

<br>
We can do better.<br>
<br>
tim<br>
--<br>
tim Rowledge; <a href="mailto:tim@rowledge.org">tim@rowledge.org</a>; <a href="http://www.rowledge.org/tim" target="_blank">http://www.rowledge.org/tim</a><br>
Useful random insult:- Paralyzed from the neck up.<br>
<br>
<br>
<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Casey Ransberger
</div>