Rust has no Exceptions?

I think this is a misconception. Effect systems can compose exception types without open variants by (something isomorphic to) passing them in as arguments. For example, to get the “sum” of errors Foo and Bar you can use in Bluefin

(e1 :> es, e2 :> es) =>
Exception Foo e1 ->
Exception Bar e2 ->
Eff es r

or in effectful

(Error Foo :> es, Error Bar :> es) =>
Eff es r

This is perfectly composable, no new type system features necessary.

4 Likes