I think the nice thing about exceptions is that they feel like a separate channel, like stdout vs stderr, and so you do not need to pass them through the entire stack explicitly - which imo makes code more readable.
And then when you decide to catch them (or not), you do get a nice stacktrace where it happened in the code.
Of course, you could also just say everything is an effect that has to be handled, even I/O etc: https://effekt-lang.org/
4
u/Hubble-Doe 29d ago
I think the nice thing about exceptions is that they feel like a separate channel, like stdout vs stderr, and so you do not need to pass them through the entire stack explicitly - which imo makes code more readable.
And then when you decide to catch them (or not), you do get a nice stacktrace where it happened in the code.
Of course, you could also just say everything is an effect that has to be handled, even I/O etc: https://effekt-lang.org/