Hello, would you consider restricting Result[+T, +E] to Result[+T, +E <: Exception]?
If something is a result, the Err case should communicate some information about what went wrong. And Exceptions are the way to do that in Scala: Exceptions can be chained with causality relation and also contain stack traces. Plus have other advantages, like interop with Java and related tooling and can be (re)thrown and caught.
Generally speaking, using Exception for things like Result is the best practice within the wider software engineering Scala world, so it would be nice if steps/Result nudged its users in the right direction.
Hello, would you consider restricting
Result[+T, +E]toResult[+T, +E <: Exception]?If something is a result, the
Errcase should communicate some information about what went wrong. AndExceptions are the way to do that in Scala:Exceptions can be chained with causality relation and also contain stack traces. Plus have other advantages, like interop with Java and related tooling and can be (re)thrown and caught.Generally speaking, using
Exceptionfor things likeResultis the best practice within the wider software engineering Scala world, so it would be nice if steps/Result nudged its users in the right direction.