![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Note that, whenever the receiver of an &
message is false
, the
computation required to evaluate the argument is wasted, because the answer
must be false
no matter what the argument's value may be.
Similarly, whenever the receiver of an |
message is true
, the
computation required to evaluate the argument is wasted, because the answer
must be true
no matter what the argument's value may be.
To avoid wasting the computation required to evaluate arguments, many
Smalltalk programmers avoid &
and |
altogether, using the
and:
and or:
messages instead.