I wonder if there is any reason - or if it is just an accident of history - that there are no !>
and !<
operators in most programming languages?
a >= b
(a greater OR equals b) could be written as !(a < b)
(a NOT lesser b), that equals a !< b
.
This question struck me when I was in the middle of coding my own expression tree builder. Most programming languages have a != b
operator for !(a=b)
, so why no !>
and !<
?
UPDATE:
!<
(not lesser) is easier to pronounce than>=
(greater or equals)!<
(not lesser) is shorter to type than>=
(greater or equals)!<
(not lesser) is easier to understand* than>=
(greater or equals)
*because OR
is binary operator you brain need to operate two operands (grater, equals), while NOT
is unary operator and you brain need to operate only with one operand (lesser).