<div dir="auto"><div><br><div class="gmail_extra"><br><div class="gmail_quote">On Mar 25, 2018 2:46 PM, "Levente Uzonyi" <<a href="mailto:leves@caesar.elte.hu">leves@caesar.elte.hu</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="quoted-text">On Sun, 25 Mar 2018, <a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a> wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Chris Cunningham uploaded a new version of Kernel to project The Trunk:<br>
<a href="http://source.squeak.org/trunk/Kernel-cbc.1163.mcz" rel="noreferrer" target="_blank">http://source.squeak.org/trunk<wbr>/Kernel-cbc.1163.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: Kernel-cbc.1163<br>
Author: cbc<br>
Time: 21 March 2018, 9:09:20.773568 pm<br>
UUID: 45d9dad8-7c81-034e-b578-b9ccd2<wbr>91cab6<br>
Ancestors: Kernel-dtl.1162, Kernel-fn.1152<br>
<br>
Update #xor: to work with argument being a block as well.<br>
<br>
=============== Diff against Kernel-dtl.1162 ===============<br>
<br>
Item was added:<br>
+ ----- Method: Boolean>>xor: (in category 'logical operations') -----<br>
+ xor: aBoolean +       "Exclusive OR. Answer true if the receiver is not equivalent to aBoolean."<br>
+ +     ^(self == aBoolean) not!<br>
</blockquote>
<br></div>
Why not just<br>
<br>
        ^self ~~ aBoolean<br></blockquote></div></div></div><div dir="auto">Because that lets you xor between Boolean and other a</div><div dir="auto">Odd stuff. Meaning bugs can creep in without any errors being raised. </div><div dir="auto">Yes ~~ is faster - but xor: is already fast. </div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
?<div class="quoted-text"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Item was changed:<br>
 ----- Method: False>>xor: (in category 'logical operations') -----<br>
 xor: aBoolean<br>
+       "aBoolean is either a boolean, or an object who's #value returns a boolean (usually a block)."<br>
+       ^aBoolean value ifTrue: [ true ] ifFalse: [ false ]!<br>
</blockquote>
<br></div>
I think the parameter should have a better name, because the #value send doesn't make much sense when you read the code.<font color="#888888"><br>
</font></blockquote></div></div></div><div dir="auto">I guess so. </div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><font color="#888888"><br>
Levente</font><div class="elided-text"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
-       "Posted by Eliot Miranda to squeak-dev on 3/24/2009"<br>
- -     ^aBoolean!<br>
<br>
Item was changed:<br>
 ----- Method: True>>xor: (in category 'logical operations') -----<br>
 xor: aBoolean<br>
+       "aBoolean is either a boolean, or an object who's #value returns a boolean (usually a block)."<br>
+       ^aBoolean value ifTrue: [ false ] ifFalse: [ true ]!<br>
-       "Posted by Eliot Miranda to squeak-dev on 3/24/2009"<br>
- -     ^aBoolean not!<br>
</blockquote>
<br>
</div></blockquote></div><br></div></div></div>