3 ms·
This is a great point. But how about if the language would allow the programmer to specify what range of values is expected for function input/output? Then a c
by superjan 4y ago
This is a great point. But how about if the language would allow the programmer to specify what range of values is expected for function input/output?
Then a compiler could try to reason about the computation and decide that overflow does not happen if all values are within bounds, and just add checks at the function boundaries.
- saagarjha 4y agoThis would require more checks, not fewer?