[eeps] EEP 049: Value-Based Error Handling Mechanisms
Loïc Hoguin
essen@REDACTED
Fri Dec 7 16:39:46 CET 2018
Hello,
On 12/7/18 12:28 PM, Kenneth Lundin wrote:
> Comments on the solution
>
> In most of the examples where we find usage of nested case, the unwanted
> result ({error, Reason} in this case) is not just returned, there is
> some other actions performed as well before returning. In those cases
> the proposed solution does not help.
>
> * We don't like a language construct which is hard coded to support
> ok,{ok,Result}, {error,Reason}.
> * the use of underscore _ <~ to mean a match with ok is not a hit, it
> will make programs harder to read
> * We are against the introduction of /unwrapexprs/ that cannot be used
> everywhere where expressions are allowed.
> * The /unwrapexpr/ changes the scoping rules and can not be used in
> nested expressions and not outside begin ... end.
[...]
> * We say no to the proposed language extensions. We don't think they
> are general enough and we also see some problems with them.
[...]
In other words a proposal that doesn't have the unwrap mechanism (and
therefore no hard coding) would have better chances of being accepted?
This is the only argument against it as far as I can see.
There's also "we can do it with exceptions!" but I don't think that's a
strong argument.
Cheers,
--
Loïc Hoguin
https://ninenines.eu
More information about the eeps
mailing list