8 Apr
2016
8 Apr
'16
1:16 p.m.
On 8.04.2016 09:26, Greg Ewing wrote:
Michael Selik wrote:
To clarify, the proposal is: ``~True == False`` but every other operation on ``True`` remains the same, including ``True * 42 == 42``. Correct?
Seems to me things are fine as they are.
The justification for & and | on bools returning bools is that the result remains within the domain of bools, even when they are interpreted as int operations.
But ~ on a bool-interpreted-as-an-int doesn't have that property, so ~True is more in the realm of True * 42 in that regard.
What should be the result of +True? 1 or True? regards, Niki