Questions tagged [short-circuit-evaluation]

Short circuit evaluation refers to the behavior in which an operator does not evaluate any operands that would not affect the overall result.

Filter by
Sorted by
Tagged with
8 votes
6 answers

Why do relational comparison operators never short-circuit?

I just thought about the possibility for the less-than and-greater than operators to short-circuit. That is, they can skip evaluating their second operand if the value of the second operand logically ...
user16217248's user avatar
  • 7,535