|
|
|
|
|
by codedokode
463 days ago
|
|
This becomes a vicious circle. Language developers do not want to make the language safer because legacy CPUs do not support overflow trapping, and CPU designers do not bother to add it because nobody needs it. For example, RISC-V spec says that they decided to not add overflow trapping because it is "easy" to do in 3 or 4 existing instructions. |
|
It is not just "easy" to do, but actually easy to do, without quotes.
And much, much easier than as an exception/trap.
And it is explicit, which makes it even better. No hidden behaviour.