Hi Nicholas,<div><br></div><div>    IMO you&#39;re going to far here.  Make selectors send the asSet to insulate the system from this.  keys answering an Array is OK, but selectors not answering a set is going to break lots and lots of code.<br>
<br><div class="gmail_quote">On Tue, Oct 20, 2009 at 12:50 PM,  <span dir="ltr">&lt;<a href="mailto:commits@source.squeak.org">commits@source.squeak.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Nicolas Cellier uploaded a new version of Traits to project The Trunk:<br>
<a href="http://source.squeak.org/trunk/Traits-nice.237.mcz" target="_blank">http://source.squeak.org/trunk/Traits-nice.237.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: Traits-nice.237<br>
Author: nice<br>
Time: 20 October 2009, 9:50:34 am<br>
UUID: 53b4311b-7ab7-4f8a-bd01-7320dc813f66<br>
Ancestors: Traits-nice.236<br>
<br>
Track selectors usage, use #asSet where due<br>
<br>
=============== Diff against Traits-nice.236 ===============<br>
<br>
Item was changed:<br>
  ----- Method: TCompilingBehavior&gt;&gt;selectors (in category &#39;accessing method dictionary&#39;) -----<br>
  selectors<br>
+       &quot;Answer a collection of all the message selectors specified in the receiver&#39;s<br>
-       &quot;Answer a Set of all the message selectors specified in the receiver&#39;s<br>
        method dictionary.&quot;<br>
<br>
        ^ self methodDict keys!<br>
<br>
Item was changed:<br>
  ----- Method: TPureBehavior&gt;&gt;ensureLocalSelectors (in category &#39;traits&#39;) -----<br>
  ensureLocalSelectors<br>
        &quot;Ensures that the instance variable localSelectors is effectively used to maintain<br>
        the set of local selectors.<br>
        This method must be called before any non-local selectors are added to the<br>
        method dictionary!!&quot;<br>
<br>
        self basicLocalSelectors isNil<br>
+               ifTrue: [self basicLocalSelectors: self selectors asSet]!<br>
-               ifTrue: [self basicLocalSelectors: self selectors]!<br>
<br>
Item was changed:<br>
  ----- Method: TCompilingBehavior&gt;&gt;crossReference (in category &#39;user interface&#39;) -----<br>
  crossReference<br>
        &quot;Answer an Array of arrays of size 2 whose first element is a message selector in the receiver&#39;s method dictionary and whose second element is a set of all message selectors in the method dictionary whose methods send a message with that selector. Subclasses are not included.&quot;<br>

<br>
+       ^self selectors asArray sort collect: [:x | Array<br>
-       ^self selectors asSortedCollection asArray collect: [:x |               Array<br>
                        with: (String with: Character cr), x<br>
                        with: (self whichSelectorsReferTo: x)]<br>
<br>
        &quot;Point crossReference.&quot;!<br>
<br>
<br>
</blockquote></div><br></div>