[squeak-dev] and:and:and:...

Randal L. Schwartz merlyn at stonehenge.com
Sat Jan 2 03:21:23 UTC 2010


>>>>> "Levente" == Levente Uzonyi <leves at elte.hu> writes:

Levente> I agree. I also prefer #and: and #or: against #& and #|, mainly
Levente> because of better performance. These two are in the ANSI standard so
Levente> we shouldn't remove them, but replacing their sends with #and: and
Levente> #or: in the trunk sounds like a good idea.

No.  The semantics of #and: and #or: guarantee short-circuit evaluation, while
#& and #| always evaluates the argument.  You can't just trade one for the
other.

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