|
|
|
|
|
by resoluteteeth
1336 days ago
|
|
> But why? Most modern languages try to get rid of exceptions (Go, Kotlin, Rust). All three of those languages actually have exceptions, they just don't encourage catching exceptions as a normal way of error handling Also, while the trend now seems to be for newer languages to encourage use of things like result types, one of the main reasons for that is that in current languages it is easier to show that functions can potentially failure in the type system using result types rather than exceptions. Otherwise, there isn't necessarily inherently a strong reason to prefer one or the other, and it's possible that future languages will go back to exceptions but have a way to express that in the type system using effects, etc. |
|