Questions tagged [logical-operators]
The logical-operators tag has no usage guidance.
2
questions
1
vote
2
answers
429
views
Is it necessary to differentiate between && and & when I support overloads [closed]
It is an old tradition in programming languages to use & and | to represent bitwise operations, and ...
9
votes
5
answers
1k
views
How to make logical operators that return operands consistent in a statically typed language?
In C++, 3 || 4 returns true. But in Python, 3 or 4 returns 3 instead. That's a logical operator that returns its operand. I don'...