Currently the lib has Maybe<T> for expressions that may or may not produce a T, and Result<T, TError> for expressions that will either produce a T or fail and produce a TError. For cases that produce no value on success but may fail we use Result<T=None, TError> but there's not really any reason to interact with the None on the consumer side of a Result<None,>. Perhaps a Result<TError> type could be implemented as Result<T=None, TError> to maintain the semantics of Result<,> handling and reduce the (admittedly, very miniscule amount of) boilerplate.
The proposal is essentially Maybe<T> where T represents an error type. Result<TError> is suggested over using Maybe<T where T represents an error type because the semantics of Maybe<> and Result<,> handling both already exist, and differ. It would be fair argue that Maybe<SomeError> represents a value that may be a SomeError, but I would argue that dealing with values VS dealing with errors is a significant enough difference to warrant distinct semantics especially since we already have the concept of Result<,>.
Currently the lib has
Maybe<T>for expressions that may or may not produce aT, andResult<T, TError>for expressions that will either produce aTor fail and produce aTError. For cases that produce no value on success but may fail we useResult<T=None, TError>but there's not really any reason to interact with theNoneon the consumer side of aResult<None,>. Perhaps aResult<TError>type could be implemented asResult<T=None, TError>to maintain the semantics ofResult<,>handling and reduce the (admittedly, very miniscule amount of) boilerplate.The proposal is essentially
Maybe<T>whereTrepresents an error type.Result<TError>is suggested over usingMaybe<TwhereTrepresents an error type because the semantics ofMaybe<>andResult<,>handling both already exist, and differ. It would be fair argue thatMaybe<SomeError>represents a value that may be aSomeError, but I would argue that dealing with values VS dealing with errors is a significant enough difference to warrant distinct semantics especially since we already have the concept ofResult<,>.