<br><br><div class="gmail_quote">On Thu, Mar 4, 2010 at 8:37 PM, Colin Putney <span dir="ltr">&lt;<a href="mailto:cputney@wiresong.ca">cputney@wiresong.ca</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
On 2010-03-04, at 1:18 PM, Stéphane Rollandin wrote:<br>
<br>
&gt; I got it; see my answer to Juan. I guess I&#39;m just programming in bad style: I do indeed consider that Object is part of my packages (or, more accurately, that Object is not a forbidden place for my package to go in).<br>

<br>
Hear hear. I&#39;ve been wondering why people are so enthusiastic about #is: - good to see I&#39;m not the only one.<br>
<br>
I think #isA: is fine, as an easy way to do #isKindOf: without a direct class reference. Being able to avoid class references makes it easier to avoid dependencies, which makes it easier to have a modular system.<br>
<br>
Juan&#39;s implementation of #is: puzzles me though. It replaces polymorphic dispatch with boolean logic. Good OO design generally goes in the opposite direction.<br>
<br>
Furthermore, Juan&#39;s version of #is: makes it more difficult to modularize the system. If I write a package that needs to add the concept of &quot;greenness&quot; to the system, I can add #isGreen extension methods wherever I want, without breaking any existing code. Somebody else can add #isPurple methods without breaking my code. But if we both need to override #is:, we have a gratuitous incompatibility.<br>

<br>
Note that #is: may work well in Cuis, but that&#39;s because Cuis is *not* a modular system.<br>
<br>
Finally, I also want to point out that &quot;simpler&quot; and &quot;fewer methods&quot; are not the same thing. Methods that answer booleans are dead simple to understand, no matter how many of them there are. A single #is: method increases incomplexity as the number of tests it encompasses increases.<br>

<br>
So, consider this moral support for Stéphane, since he seems to be beset on all sides. Also,<br>
<br>
+0 for #isA:<br>
-1 for #is:<br>
<font color="#888888"><br>
Colin<br></font></blockquote><div><br></div><div>Hear, hear!</div></div><br>