[swift-evolution] [Proposal] Type Narrowing
Haravikk
swift-evolution at haravikk.me
Wed Nov 9 12:51:59 CST 2016
So I'm trying to re-write the proposal with the use of a keyword for unwrapping in mind, to keep it simpler for myself I've done this as two separate proposals for the time being, one for simpler unwrapping of optionals, and one for type-narrowing of polymorphic types:
https://github.com/Haravikk/swift-evolution/blob/master/proposals/NNNN-optional-unwrapping.md
https://github.com/Haravikk/swift-evolution/blob/master/proposals/NNNN-type-narrowing.md
In addition to feedback on each proposal, I'm interested to know whether people think it is better to keep these separate? They're still very similar features, but the differences make it pretty awkward to keep them in one big proposal.
I've also given up on integrating enums generically into it; as I don't think it's possible to do it in a similar enough way, and some extension to pattern matching would probably be better anyway.
More information about the swift-evolution
mailing list