1) #xor: should not take a block as argument.<br>Rationale:<br>- the block would ALWAYS have to be evaluated<br>- block arguments are either for repeated evaluation, or condiitonal evaluation...<br>This is not the case here, so the need of a block argument vanishes...<br>
<br>2) #xor: argument should be a Boolean, but here no guard is made.<br><br>We could eventually add:<br>   aBoolean isBoolean ifFalse; [self error: &#39;xor must take a boolean as argument&#39;]<br><br>Or if we want to later extend to some other class:<br>
True&gt;&gt;xor: aBoolean<br>    ^aBoolean xorTrue<br>
False&gt;&gt;xor: aBoolean<br>
    ^aBoolean xorFalse<br>True&gt;&gt;xorTrue<br>    ^false<br>
True&gt;&gt;xorFalse<br>
    ^self<br>

False&gt;&gt;xorTrue<br>

    ^true<br>False&gt;&gt;xorFalse<br>

    ^self<br><br>MySymbolicBooleanClass&gt;&gt;xorTrue<br>    ^SymbolicXorOperation with: self with: true<br><br>I&#39;m not sure whether we need to protect or not...<br>I tend to avoid over-protecting code. As long as a debugger opens, I claim protecting is void...<br>
But here, I don&#39;t like a false program proceeding without a Notifier....<br><br>Nicolas<br><br><div class="gmail_quote">2009/3/24 Keith Hodges <span dir="ltr">&lt;<a href="mailto:keith_hodges@yahoo.co.uk">keith_hodges@yahoo.co.uk</a>&gt;</span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">true xor: [ true ]  =&gt; true<br>
<br>
discuss<br>
<font color="#888888"><br>
Keith<br>
<br>
<br>
<br>
</font></blockquote></div><br>