[swift-evolution] [proposal] Either in the Swift Standard Library
ccruden at novafore.com
Fri Jan 22 22:45:00 CST 2016
I was reading the proposal and I have to admit I do like Either and have used it extensively in Scala for normal exceptions (business validations) leaving exceptions to … exceptional circumstances. If I went back I think I could get rid of quite a bit of stuff if I had put more thought into it.
When it comes to validations though I was wondering how you saw it coming together:
i.e. you have a set of validations that you run (independent validations) where after you finished if any of them has a validation you just want a list of business exceptions.
The other scenario I could see is dependent validations where certain validations you want to skip because a validation that it was dependent on failed - i.e. you don’t want to be flooded with other validations which occur solely due to an earlier failed validation. (i.e. concise execution of a list of validations or something like that).
> On 2016-01-21, at 10:17:34, Developer via swift-evolution <swift-evolution at swift.org> wrote:
> Hey all,
> Just added a section of motivating examples to the Either proposal. Ping me if you have any more that I missed ('cause I'm sure I did miss a lot).
> ~Robert Widmann
> 2016/01/09 14:19、Developer <devteam.codafi at gmail.com> のメッセージ:
>> Because the last discussion, while substantive and very much appreciated, did not debate the proposal much, I'd like to begin discussion anew about the addition of an Either type to the Swift Standard Library. The proposal can be found here (https://github.com/apple/swift-evolution/pull/67#issuecomment-170269481) and a link to the root our previous round of discussion is here (https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20151207/001394.html).
>> Thanks all!
>> ~Robert Widmann
> swift-evolution mailing list
> swift-evolution at swift.org
More information about the swift-evolution