Closed mfelsche closed 6 years ago
I know this is kinda controversial, but i wanted to give it a shot anyway.
Fight!
I like the general idea of allowing the users to write safe/correct code and the consistency this proposal provides for all operators is nice.
@jemc yeah, i forgot that section. I updated the RFC. thanks for checking.
I like this. If I'm not here when a vote happens, I vote yes.
Also, in the context of how Matthias explains these operators, do we want to revisit calling the ~
operators _unsafe
?
I would like to add that using BigInteger and some static types check may be an alternative since they can't overflow/underflow and a smartly enough compiler may be able to prove when the denominator may be different than 0 to safely allow a division. The disadvantage of this technique is that is mostly shift the problem to the point where it may be needed to convert a BigInteger to a different size with a smaller capacity.
Rendered