<div dir="ltr">Only tangentially related but I can&#39;t resist. Here&#39;s my least-favorite hack... pure evil. What was that thing uncle Ben said about power?<div><br></div><div style>someObject perform: (&#39;foo&#39; , &#39;Bar&#39;) asSymbol. &quot;There are no senders of #fooBar! Oh wait...&quot;</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Aug 31, 2013 at 8:30 PM, Casey Ransberger <span dir="ltr">&lt;<a href="mailto:casey.obrien.r@gmail.com" target="_blank">casey.obrien.r@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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"><div><div class="h5"><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" target="_blank">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></div></div><span class="HOEnZb"><font color="#888888">-- <br>Casey Ransberger
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Casey Ransberger
</div>