News for hackers. Stuff that matters.
Re:Effective Rust by dllthomas on Thursday June 15, 2023 @03:33PM (#36345373)
> Everyone just started using unchecked exceptions because they provide an easier coding experience.

I think that's true, but I think there's some ambiguity about what sort of "easier coding experience" mattered. I feel like it's often portrayed as "too lazy to write the annotations", but in practice the language to describe exceptions is often too limited to express what we'd want. As a trivial example, we'd like to be able to say "map() can throw anything its argument can throw". That we can't say that means a programmer working with checked exceptions needs to either catch things they shouldn't be catching in that function passed to map(), or build clever (and possibly inefficient) workarounds to extract the exception(s?!?) anyway. All of that has drawbacks enough that the downsides of unchecked exceptions may be the correct choice, not merely the lazy choice.

There are no comments on this comment yet.