3 ms·
Graydon Hoare originally wanted integers to be promoted to bignums on overflow, but that didn't happen. https://graydon2.dreamwidth.org/307291.html https://gra
by trealira 3y ago
Graydon Hoare originally wanted integers to be promoted to bignums on overflow, but that didn't happen.
https://graydon2.dreamwidth.org/307291.html https://graydon2.dreamwidth.org/307291.html
- jacquesm 3y agoThat's really the only proper solution for this problem.
- jcranmer 3y agoNot necessarily the only proper solution--hard failure, like array out-of-bounds errors, is also often an acceptable solution.
- jacquesm 3y agoThat highly depends on the execution environment. In Erlang for instance that would be an acceptable solution. But most other environments don't deal nearly as gracefully with runtime errors.
- rsaxvc 3y agoMIPS on GCC defaulted to trapping integer overflows, but they had non trapping instructions too.