Monads with E type like Future<E,A> - are unsafe for throws. Except if E is Error like in Future<Error,A> in this case it is safe.
This decision is for performance, to avoid put all program function's evaluation insight a try catch.
Although I didn't perform any perf analysis so far.
Other possibility of design is to make safety against throws in all scenarios and assume the cost of eventually try catch block every-thing. I don't know what are the trade-offs implied. Verify.
PROBLEM:
All are unsafe or all are safe. Because if I map a Future<E,A> to Future<Error,A> I can't garantee that a Try-catch-block was performed by client.
by design:
Monads with E type like Future<E,A> - are unsafe for throws. Except if E is Error like in Future<Error,A> in this case it is safe. This decision is for performance, to avoid put all program function's evaluation insight a try catch. Although I didn't perform any perf analysis so far.
Other possibility of design is to make safety against throws in all scenarios and assume the cost of eventually try catch block every-thing. I don't know what are the trade-offs implied. Verify.
https://github.com/fvilante/NextRobot/issues/14#issue-528732096