3 ms·
"So mapping over an array of integers to increment each one won't require error handling, since the operation itself cannot fail." Nitpick: in Swift, "since th
by Someone 10y ago
"So mapping over an array of integers to increment each one won't require error handling, since the operation itself cannot fail."
Nitpick: in Swift, "since the operation itself cannot fail" isn't correct. The operation will fail on overflow, but it will terminate your application rather than throw.
- astrange 10y agoThose are called "universal errors" and it's not very useful to reason about them. You could prove your program correct, use a total-function programming language, but it still could fail to complete - the power could go out halfway through execution.