Closed pkriens closed 7 years ago
You can use a <=> b
.
thanks!
Ah, that is nice. Sorry I missed that.
The reason why =
cannot be used to assert equivalence of 2 predicates is because =
is a relational operator, and as such it only accepts relations as its operands. I guess it would be possible to overload the =
operator to act as set equality when operands are relations and as boolean equivalence when operands are boolean; the way it is now, in my opinion, makes the language cleaner.
It is now difficult to verify if two predicates are the same.
This then requires something like:
Which is kind of complexifying. I understand that it is caused by not exposing the primitive boolean to the language but I am not sure I understand why? Booleans are a common type. Although they are often abused (in Java booleans should often be an enum) they have their use. Especially here