[swift-evolution] Revisiting SE-0110

Kyle Murray kyle_murray at apple.com
Thu Jun 15 14:08:10 CDT 2017


Yes, in the sense that the grammar <https://developer.apple.com/library/content/documentation/Swift/Conceptual/Swift_Programming_Language/Patterns.html#//apple_ref/doc/uid/TP40014097-CH36-ID423> has a production that permits the tuple element name. But there aren't any examples that use labels within patterns.


GRAMMAR OF A TUPLE PATTERN

 <>tuple-pattern → (­tuple-pattern-element-list <https://developer.apple.com/library/content/documentation/Swift/Conceptual/Swift_Programming_Language/Patterns.html#//apple_ref/swift/grammar/tuple-pattern-element-list>­opt­)­
 <>tuple-pattern-element-list → tuple-pattern-element <https://developer.apple.com/library/content/documentation/Swift/Conceptual/Swift_Programming_Language/Patterns.html#//apple_ref/swift/grammar/tuple-pattern-element>­   | tuple-pattern-element <https://developer.apple.com/library/content/documentation/Swift/Conceptual/Swift_Programming_Language/Patterns.html#//apple_ref/swift/grammar/tuple-pattern-element>­,­tuple-pattern-element-list <https://developer.apple.com/library/content/documentation/Swift/Conceptual/Swift_Programming_Language/Patterns.html#//apple_ref/swift/grammar/tuple-pattern-element-list>­
 <>tuple-pattern-element → pattern <https://developer.apple.com/library/content/documentation/Swift/Conceptual/Swift_Programming_Language/Patterns.html#//apple_ref/swift/grammar/pattern>­   |  identifier <https://developer.apple.com/library/content/documentation/Swift/Conceptual/Swift_Programming_Language/LexicalStructure.html#//apple_ref/swift/grammar/identifier>­:­pattern <https://developer.apple.com/library/content/documentation/Swift/Conceptual/Swift_Programming_Language/Patterns.html#//apple_ref/swift/grammar/pattern>­
 <>

-Kyle

> On Jun 15, 2017, at 10:34 AM, Chris Lattner via swift-evolution <swift-evolution at swift.org> wrote:
> 
> Is this capability even documented in TSPL?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170615/fca29cac/attachment.html>


More information about the swift-evolution mailing list