SE-0235 - Add Result to the Standard Library

Since Error existentials have a single retainable pointer representation, we should consider making Error self-conforming. It does not have any constructors or static methods and the representation works out so it should be possible to change the type checker to allow this and then it will just work.

As a bonus, in Chris's implementation the extension Result where Self.Error == Error can be merged with extension Result where Self.Error : Error.

8 Likes