[swift-evolution] [swift-evolution-announce] [Review] SE-0043 Declare variables in 'case' labels with multiple patterns
Brent Royal-Gordon
brent at architechies.com
Wed Mar 16 20:10:46 CDT 2016
> • What is your evaluation of the proposal?
Good stuff.
How exact does the type match have to be? Can they be two subclasses of a different superclass? Can they conform to common protocols? Can they conform to no common protocols and just be `AnyObject` or `Any`?
Is there a way to specify the type, either to get an exact match or just to ask or a supertype? If you do that, does it have to be specified on both, or only one? Something like:
case let .Case1(x: SignedIntegerType, 2), let .Case2(2, x):
> • Is the problem being addressed significant enough to warrant a change to Swift?
It's a minor concern, but still very helpful to fix.
> • Does this proposal fit well with the feel and direction of Swift?
Yes.
> • If you have used other languages or libraries with a similar feature, how do you feel that this proposal compares to those?
I don't believe I have. It's nice.
> • How much effort did you put into your review? A glance, a quick reading, or an in-depth study?
Quick reading.
--
Brent Royal-Gordon
Architechies
More information about the swift-evolution
mailing list