There are two interesting extremes of platform independent programming language design. One maps to hardware operations without surprising overhead, and another maximizes code correctness and verifiability by obeying all expected mathematical and set theoretic properties.
-
-
And ℤ/2³²ℤ is a perfectly fine mathematical object, it's just that most of the time you want to imagine you're actually in ℤ but with the additional invariant that you're not overflowing. Rust gives you the choice.
-
The fact that right shift of a negative number is UB is not being close to the machine, it's a delusional fantasy of being able to abstract over a class of machines that includes non twos complement (fortunately to be fixed in C/C++2x).
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.