[squeak-dev] Protocol extension proposal: Boolean>>asBit ?

Randal L. Schwartz merlyn at stonehenge.com
Sat Dec 5 13:57:58 UTC 2009


>>>>> "Bert" == Bert Freudenberg <bert at freudenbergs.de> writes:

Bert> This is not about internal representation, but about doing arithmetic
Bert> with booleans. I don't think any other mapping than "true asInteger = 1"
Bert> and "false asInteger = 0" makes sense in that context.

you never did math with Microsoft BASIC in the 80's, I guess. :)  We
got used to the -1 convention.

Bert> The point was to have a unary message to simplify arithmetic expressions.

Well, again, encoded according to who.  If it's a core message, it should be
universal, I think.

-- 
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