2 ms·
How can you argue that a result type is more forcefully thought about than checked exceptions? If that was the goal, shouldn't we like checked exceptions the b
by jayd16 4y ago
How can you argue that a result type is more forcefully thought about than checked exceptions?
If that was the goal, shouldn't we like checked exceptions the best?
The point of the article is that, at least in python, skipping the result check is cheaper in the happy path and slower in the exceptional case which is a useful trick. You haven't addressed that trade-off at all.
- valenterry 4y agoChecked exceptions like in Java have terrible ergonomics and require a lot of special handling by the language and don't work well in combimation with other language features. Return values also have their cavets, but I think languages like Rust are doing well enough so that their ergonomics are way above what you can get with check exceptions, even with a good implementation.