6 ms·
There are a lot of three-valued logics that lots of programming languages implicitly follow by accident sometimes. For example: true || 3 ==3 || panic() wil
by philwelch 9y ago
There are a lot of three-valued logics that lots of programming languages implicitly follow by accident sometimes. For example:
true || 3 ==3 || panic()
will, through short-circuiting, evaluate to “true” even though the final element doesn’t evaluate to either true or false.
(As you may observe, they also follow a weird logic where AND and OR are not commutative...)