xor operator?
Tim Peters
tim.one at home.com
Wed Jan 31 04:51:17 EST 2001
[Greg Wilson]
> LOL! I grepped through SmallEiffel's standard library and found one
> place where the boolean xor was used: in part of a contract.
[Nicola Musatti]
> And was it really more expressive than a (very probably) equivalent
> "!=" would have been?
In Eiffel, yes: logical expressions play a much larger role in Eiffel than
in most other languages, and in some contexts are even auto-extracted into
the docs. "A xor B" communicates "exactly one of A and B must hold" more
clearly than "whether A holds is not equal to whether B holds". That's
important there. Eiffel has an infix "implies" operator for the same
reason.
but-eiffel-isn't-python-ly y'rs - tim
More information about the Python-list
mailing list