Evaluation that skips a later operand once an earlier operand determines the result. In Scala,
p != null && p.field == x does not dereference p when it is null, and i < n && a(i) != x avoids an out-of-range access at . The order is part of the safety argument: exchanging these operands can preserve a Boolean formula in mathematics while changing whether a program raises an exception. Articles by others on the same topic
There are currently no matching articles.