[squeak-dev] [bug] xor: is this an old bug or what?

Randal L. Schwartz merlyn at stonehenge.com
Tue Mar 24 20:36:45 UTC 2009


>>>>> "Eliot" == Eliot Miranda <eliot.miranda at gmail.com> writes:

Eliot> I think just

True> xor: aBoolean
Eliot>     ^aBoolean not

False> xor: aBoolean
Eliot>     ^aBoolean

Eliot> and then leave subsequent usage to catch possible type errors; e.g. (false
Eliot> xor: #blah) ifTrue: ... will raise a mustBeBoolean error.

What I don't like about this is that the right operand doesn't get a chance to
"boolify" itself, or define its own xor logic.  The double-dispatch versions
were a lot better at that.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn at stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion



More information about the Squeak-dev mailing list