<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Nov 28, 2014 at 4:26 PM, Sven Van Caekenberghe <span dir="ltr">&lt;<a href="mailto:sven@stfx.eu" target="_blank">sven@stfx.eu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class=""><div class="h5"><br>
&gt; On 28 Nov 2014, at 15:35, Marcus Denker &lt;<a href="mailto:marcus.denker@inria.fr">marcus.denker@inria.fr</a>&gt; wrote:<br>
&gt;<br>
&gt;<br>
&gt;&gt; On 27 Nov 2014, at 08:21, Marcus Denker &lt;<a href="mailto:marcus.denker@inria.fr">marcus.denker@inria.fr</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;&gt; On 26 Nov 2014, at 19:19, Eliot Miranda &lt;<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>&gt; wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Hi All,<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;   IdentitySet&gt;&gt;collect: answers a Set, not an IdentitySet.  Anyone else agree this is a serious bug?  Anyone else disagree?<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; WTF??<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; (IdentitySet withAll: #(1 2 3 1.0 2.0 3.0)) collect: [:e| e] a Set(1.0 2 3)<br>
&gt;&gt;<br>
&gt;&gt; Yes, I would say so. I think we fixed some others like that already (not 100% sure)<br>
&gt;&gt;<br>
&gt;&gt; I added an issue tracker entry<br>
&gt;&gt;<br>
&gt;&gt; 14535        IdentitySet&gt;&gt;collect: answers a Set, not an IdentitySet.<br>
&gt;&gt;      <a href="https://pharo.fogbugz.com/f/cases/14535" target="_blank">https://pharo.fogbugz.com/f/cases/14535</a><br>
&gt;&gt;<br>
&gt;<br>
&gt; #collect: directly uses Set in Set&gt;&gt;#collect, I committed a fix (to the issue tracker, to be reviewed)<br>
&gt; to use “self species” instead (plus the example from above as a test in IdentitySetTest).<br>
&gt;<br>
&gt;       Marcus<br>
<br>
</div></div>I think that is the most logical thing to do, it is what I would expect.<br>
<br>
I know others have cases where that is not really what you want (some of Set&#39;s subclasses are pretty special), but it is still a good default, while #collect:as: can be used for all other cases (and subclasses can override #species again if they want).<br>
<span class=""><font color="#888888"><br></font></span></blockquote><div><br></div><div>Hmm... errors found by the test runner on that change.</div><div><br></div><div><a href="https://ci.inria.fr/pharo/job/Pharo-4.0-Issue-Validator/17683//artifact/validationReport.html">https://ci.inria.fr/pharo/job/Pharo-4.0-Issue-Validator/17683//artifact/validationReport.html</a><br></div><div><br></div><div>So we will need to check... </div><div> </div></div><div class="gmail_signature">    Marcus</div>
</div></div>