<div dir="ltr">#xor: is on the same plane as #| and #& - evaluate both sides and apply<div><br></div><div>We also have #and: and #or: - evaluate receiver, and evaluate argument block if and only if necessary.</div><div><br></div><div>I use #and: and #or: for speed purposes - and to avoid side effects (sometimes).</div><div><br></div><div>I'm just curious - is there an equivalent symbol for xor similar to | and & that we could use?</div><div><br></div><div>Also, before making this change to using blocks (if we do), we'd need to fix all users - probably also in the VMMaker packages.</div><div><br></div><div>-cbc<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Feb 9, 2018 at 9:18 AM, Levente Uzonyi <span dir="ltr"><<a href="mailto:leves@caesar.elte.hu" target="_blank">leves@caesar.elte.hu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Fri, 9 Feb 2018, marcel.taeumel wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
commits-2 wrote<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
A new version of Kernel was added to project The Inbox:<br>
<a href="http://source.squeak.org/inbox/Kernel-fn.1151.mcz" rel="noreferrer" target="_blank">http://source.squeak.org/inbox<wbr>/Kernel-fn.1151.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: Kernel-fn.1151<br>
Author: fn<br>
Time: 9 February 2018, 12:32:25.516883 pm<br>
UUID: 9fb7df4b-6bf4-4af8-9c75-7496c2<wbr>f0b517<br>
Ancestors: Kernel-tonyg.1150<br>
<br>
For consistency: allow blocks to be passed into #xor: (see #or: and<br>
#and:).<br>
<br>
=============== Diff against Kernel-tonyg.1150 ===============<br>
<br>
Item was changed:<br>
  ----- Method: False>>xor: (in category 'logical operations') -----<br>
+ xor: alternativeBlock<br>
- xor: aBoolean<br>
        "Posted by Eliot Miranda to squeak-dev on 3/24/2009"<br>
<br>
+       ^alternativeBlock value!<br>
-       ^aBoolean!<br>
<br>
Item was changed:<br>
  ----- Method: True>>xor: (in category 'logical operations') -----<br>
+ xor: alternativeBlock<br>
- xor: aBoolean<br>
        "Posted by Eliot Miranda to squeak-dev on 3/24/2009"<br>
<br>
+       ^alternativeBlock value not!<br>
-       ^aBoolean not!<br>
</blockquote>
<br>
Hey Nicolas,<br>
<br>
it seems that you had the intention to not allow "a xor: [b]" because,<br>
obviously, one does always have to check both operands for XOR. Yet, would<br>
it do any harm if we would allow "a xor: [b]"?<br>
</blockquote>
<br></div></div>
Performance. Two fold: you create a block for no reason, because it will always be evaluated right after its creation.<br>
If there is no block, #value still has to be sent.<span class="HOEnZb"><font color="#888888"><br>
<br>
Levente</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Best,<br>
Marcel<br>
<br>
<br>
<br>
--<br>
Sent from: <a href="http://forum.world.st/Squeak-Dev-f45488.html" rel="noreferrer" target="_blank">http://forum.world.st/Squeak-D<wbr>ev-f45488.html</a><br>
</blockquote>
<br>
</div></div></blockquote></div><br></div>