3 ms·
It's common to think of an exception as the program stopping and never being started again. In that sense, the invariant is still maintained, because the progra
by nanimo 8y ago
It's common to think of an exception as the program stopping and never being started again. In that sense, the invariant is still maintained, because the program never sees it violated. This has non-trivial consequences - for example, Rust lets exceptions and endless loops produce any value at all, even though they obviously can't actually do that.