minirust
minirust copied to clipboard
Consider removing the primitive operations on boolean, and encode them instead
We can reduce the number of primitive operations we have to support by removing bitwise and/or/xor on bool. They can instead be implemented by casting to integer, doing the operation there, and casting back.
The same goes for negation, but there we need to mask before transmuting back (or implement negation as 1 - x
instead of !x
on the integer x
).