<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><br class=""></div><div><blockquote type="cite" class=""><div class="">On Jun 10, 2016, at 4:20 PM, L. Mihalkovic <<a href="mailto:laurent.mihalkovic@gmail.com" class="">laurent.mihalkovic@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="content-type" content="text/html; charset=utf-8" class=""><div dir="auto" class=""><div class="">I noticed that the "impacted" section was not updated to the new syntax. </div></div></div></blockquote><div><br class=""></div><div>apologies, I was looking at the last reference to Any, and it is indeed correct as it is. </div><div><br class=""></div><div><br class=""></div><div>as for the grammar, I guess it is just a matter of removing the reference to protocol<> and swapping in the new & operator in composition types:</div><div><section class="section" style="padding: 15px 25px 30px; font-family: Helvetica, Arial, sans-serif; font-size: 10px; background-color: rgb(255, 255, 255);"><div class="syntax-defs" style="background-color: transparent; border-width: 0px 0px 0px 5px; border-left-style: solid; border-left-color: rgb(233, 233, 233); font-size: 1.4em; margin: 20px 0px; outline: 0px; padding: 0px 0px 0px 15px; vertical-align: baseline; line-height: 20.299999237060547px; background-position: initial initial; background-repeat: initial initial;"><p class="syntax-defs-name" style="background-color: transparent; border: 0px; font-size: 0.63em; margin: 0px 0px 8px; outline: 0px; padding: 0px; vertical-align: baseline; color: rgb(128, 128, 128); letter-spacing: 2px; text-transform: uppercase; background-position: initial initial; background-repeat: initial initial;">GRAMMAR OF A PROTOCOL COMPOSITION TYPE</p><div class="syntax-defs-group" style="background-color: transparent; border: 0px; margin: 0px 0px 12px; outline: 0px; padding: 0px; vertical-align: baseline;"><div style="background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;" class=""><a name="//apple_ref/swift/grammar/protocol-composition-type" style="background-color: transparent; border: 0px; margin: -85px 0px 0px; outline: 0px; padding: 85px 0px 0px; vertical-align: baseline; display: block; width: 0px; height: 0px; color: rgb(0, 136, 204);" class=""></a><span class="syntax-def-name" style="background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; color: rgb(128, 128, 128); font-style: italic;">protocol-composition-type </span><span class="arrow" style="background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px 0px 0px 4px; vertical-align: baseline; color: rgb(128, 128, 128);">→ </span><code class="literal" style="background-color: transparent; border: 0px; font-size: 0.86em; margin: 0px; outline: 0px; padding: 0px 4px; vertical-align: baseline; font-family: Menlo, monospace; font-weight: 600; word-wrap: break-word;">protocol</code><code class="literal" style="background-color: transparent; border: 0px; font-size: 0.86em; margin: 0px; outline: 0px; padding: 0px 4px; vertical-align: baseline; font-family: Menlo, monospace; font-weight: 600; word-wrap: break-word;"><</code><span class="optional" style="background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"><span class="syntactic-cat" style="background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px 4px; vertical-align: baseline; font-style: italic; word-break: keep-all;"><a href="https://developer.apple.com/library/ios/documentation/Swift/Conceptual/Swift_Programming_Language/Types.html#//apple_ref/swift/grammar/protocol-identifier-list" data-renderer-version="2" data-id="//apple_ref/swift/grammar/protocol-identifier-list" style="background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; color: rgb(0, 136, 204); text-decoration: none;" class="">protocol-identifier-list</a></span><sub class="subscript" style="background-color: transparent; border: 0px; font-size: 0.8em; margin: 0px 0px 0px -2px; outline: 0px; padding: 0px 4px 0px 0px; color: rgb(128, 128, 128); font-style: italic;">opt</sub></span><code class="literal" style="background-color: transparent; border: 0px; font-size: 0.86em; margin: 0px; outline: 0px; padding: 0px 4px; vertical-align: baseline; font-family: Menlo, monospace; font-weight: 600; word-wrap: break-word;">></code></div><div style="background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;" class=""><a name="//apple_ref/swift/grammar/protocol-identifier-list" style="background-color: transparent; border: 0px; margin: -85px 0px 0px; outline: 0px; padding: 85px 0px 0px; vertical-align: baseline; display: block; width: 0px; height: 0px; color: rgb(0, 136, 204);" class=""></a><span class="syntax-def-name" style="background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; color: rgb(128, 128, 128); font-style: italic;">protocol-identifier-list </span><span class="arrow" style="background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px 0px 0px 4px; vertical-align: baseline; color: rgb(128, 128, 128);">→ </span><span class="alternative" style="background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; display: inline;"><span class="syntactic-cat" style="background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px 4px; vertical-align: baseline; font-style: italic; word-break: keep-all;"><a href="https://developer.apple.com/library/ios/documentation/Swift/Conceptual/Swift_Programming_Language/Types.html#//apple_ref/swift/grammar/protocol-identifier" data-renderer-version="2" data-id="//apple_ref/swift/grammar/protocol-identifier" style="background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; color: rgb(0, 136, 204); text-decoration: none;" class="">protocol-identifier</a></span> </span><span class="alternative" style="background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; display: inline;"> <span class="syntactic-cat" style="background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px 4px; vertical-align: baseline; font-style: italic; word-break: keep-all;"><a href="https://developer.apple.com/library/ios/documentation/Swift/Conceptual/Swift_Programming_Language/Types.html#//apple_ref/swift/grammar/protocol-identifier" data-renderer-version="2" data-id="//apple_ref/swift/grammar/protocol-identifier" style="background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; color: rgb(0, 136, 204); text-decoration: none;" class="">protocol-identifier</a></span><code class="literal" style="background-color: transparent; border: 0px; font-size: 0.86em; margin: 0px; outline: 0px; padding: 0px 4px; vertical-align: baseline; font-family: Menlo, monospace; font-weight: 600; word-wrap: break-word;">,</code><span class="syntactic-cat" style="background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px 4px; vertical-align: baseline; font-style: italic; word-break: keep-all;"><a href="https://developer.apple.com/library/ios/documentation/Swift/Conceptual/Swift_Programming_Language/Types.html#//apple_ref/swift/grammar/protocol-identifier-list" data-renderer-version="2" data-id="//apple_ref/swift/grammar/protocol-identifier-list" style="background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; color: rgb(0, 136, 204); text-decoration: none;" class="">protocol-identifier-list</a></span></span></div><div style="background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;" class=""><a name="//apple_ref/swift/grammar/protocol-identifier" style="background-color: transparent; border: 0px; margin: -85px 0px 0px; outline: 0px; padding: 85px 0px 0px; vertical-align: baseline; display: block; width: 0px; height: 0px; color: rgb(0, 136, 204);" class=""></a><span class="syntax-def-name" style="background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; color: rgb(128, 128, 128); font-style: italic;">protocol-identifier </span><span class="arrow" style="background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px 0px 0px 4px; vertical-align: baseline; color: rgb(128, 128, 128);">→ </span><span class="syntactic-cat" style="background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px 4px; vertical-align: baseline; font-style: italic; word-break: keep-all;"><a href="https://developer.apple.com/library/ios/documentation/Swift/Conceptual/Swift_Programming_Language/Types.html#//apple_ref/swift/grammar/type-identifier" data-renderer-version="2" data-id="//apple_ref/swift/grammar/type-identifier" style="background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; color: rgb(0, 136, 204); text-decoration: none;" class="">type-identifier</a></span></div></div></div></section></div><div><section class="section" style="padding: 15px 25px 30px; font-family: Helvetica, Arial, sans-serif; font-size: 10px; background-color: rgb(255, 255, 255);"><div class="syntax-defs" style="background-color: transparent; border-width: 0px 0px 0px 5px; border-left-style: solid; border-left-color: rgb(233, 233, 233); font-size: 1.4em; margin: 20px 0px; outline: 0px; padding: 0px 0px 0px 15px; vertical-align: baseline; line-height: 20.299999237060547px;"><p class="syntax-defs-name" style="background-color: transparent; border: 0px; font-size: 0.63em; margin: 0px 0px 8px; outline: 0px; padding: 0px; vertical-align: baseline; color: rgb(128, 128, 128); letter-spacing: 2px; text-transform: uppercase;">GRAMMAR OF A PROTOCOL COMPOSITION TYPE</p><div class="syntax-defs-group" style="background-color: transparent; border: 0px; margin: 0px 0px 12px; outline: 0px; padding: 0px; vertical-align: baseline;"><div style="background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;" class=""><a name="//apple_ref/swift/grammar/protocol-composition-type" style="background-color: transparent; border: 0px; margin: -85px 0px 0px; outline: 0px; padding: 85px 0px 0px; vertical-align: baseline; display: block; width: 0px; height: 0px; color: rgb(0, 136, 204);" class=""></a><span class="syntax-def-name" style="background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; color: rgb(128, 128, 128); font-style: italic;">protocol-composition-type </span><span class="arrow" style="background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px 0px 0px 4px; vertical-align: baseline; color: rgb(128, 128, 128);">→ </span><span class="optional" style="background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"><span class="syntactic-cat" style="background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px 4px; vertical-align: baseline; font-style: italic; word-break: keep-all;"><a href="https://developer.apple.com/library/ios/documentation/Swift/Conceptual/Swift_Programming_Language/Types.html#//apple_ref/swift/grammar/protocol-identifier-list" data-renderer-version="2" data-id="//apple_ref/swift/grammar/protocol-identifier-list" style="background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; color: rgb(0, 136, 204); text-decoration: none;" class="">protocol-identifier-list</a></span></span></div><div style="background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;" class=""><a name="//apple_ref/swift/grammar/protocol-identifier-list" style="background-color: transparent; border: 0px; margin: -85px 0px 0px; outline: 0px; padding: 85px 0px 0px; vertical-align: baseline; display: block; width: 0px; height: 0px; color: rgb(0, 136, 204);" class=""></a><span class="syntax-def-name" style="background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; color: rgb(128, 128, 128); font-style: italic;">protocol-identifier-list </span><span class="arrow" style="background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px 0px 0px 4px; vertical-align: baseline; color: rgb(128, 128, 128);">→ </span><span class="alternative" style="background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; display: inline;"><span class="syntactic-cat" style="background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px 4px; vertical-align: baseline; font-style: italic; word-break: keep-all;"><a href="https://developer.apple.com/library/ios/documentation/Swift/Conceptual/Swift_Programming_Language/Types.html#//apple_ref/swift/grammar/protocol-identifier" data-renderer-version="2" data-id="//apple_ref/swift/grammar/protocol-identifier" style="background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; color: rgb(0, 136, 204); text-decoration: none;" class="">protocol-identifier</a></span> </span><span class="alternative" style="background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; display: inline;"> <span class="syntactic-cat" style="background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px 4px; vertical-align: baseline; font-style: italic; word-break: keep-all;"><a href="https://developer.apple.com/library/ios/documentation/Swift/Conceptual/Swift_Programming_Language/Types.html#//apple_ref/swift/grammar/protocol-identifier" data-renderer-version="2" data-id="//apple_ref/swift/grammar/protocol-identifier" style="background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; color: rgb(0, 136, 204); text-decoration: none;" class="">protocol-identifier</a></span><code class="literal" style="background-color: transparent; border: 0px; font-size: 0.86em; margin: 0px; outline: 0px; padding: 0px 4px; vertical-align: baseline; font-family: Menlo, monospace; font-weight: 600; word-wrap: break-word;">&</code><span class="syntactic-cat" style="background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px 4px; vertical-align: baseline; font-style: italic; word-break: keep-all;"><a href="https://developer.apple.com/library/ios/documentation/Swift/Conceptual/Swift_Programming_Language/Types.html#//apple_ref/swift/grammar/protocol-identifier-list" data-renderer-version="2" data-id="//apple_ref/swift/grammar/protocol-identifier-list" style="background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; color: rgb(0, 136, 204); text-decoration: none;" class="">protocol-identifier-list</a></span></span></div><div style="background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;" class=""><a name="//apple_ref/swift/grammar/protocol-identifier" style="background-color: transparent; border: 0px; margin: -85px 0px 0px; outline: 0px; padding: 85px 0px 0px; vertical-align: baseline; display: block; width: 0px; height: 0px; color: rgb(0, 136, 204);" class=""></a><span class="syntax-def-name" style="background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; color: rgb(128, 128, 128); font-style: italic;">protocol-identifier </span><span class="arrow" style="background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px 0px 0px 4px; vertical-align: baseline; color: rgb(128, 128, 128);">→ </span><span class="syntactic-cat" style="background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px 4px; vertical-align: baseline; font-style: italic; word-break: keep-all;"><a href="https://developer.apple.com/library/ios/documentation/Swift/Conceptual/Swift_Programming_Language/Types.html#//apple_ref/swift/grammar/type-identifier" data-renderer-version="2" data-id="//apple_ref/swift/grammar/type-identifier" style="background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; color: rgb(0, 136, 204); text-decoration: none;" class="">type-identifier</a></span></div></div></div></section></div><div>In this form there is the problem of the degenerate case where protocol-identifier-list is empty which is required for Any. The syntax I have been playing with for generalized existential would degenerate fine for covering this gap.</div><div><br class=""></div><div><a href="https://gist.github.com/lmihalkovic/8aa66542f5cc4592e967bade260477ef" class="">https://gist.github.com/lmihalkovic/8aa66542f5cc4592e967bade260477ef</a></div><div><br class=""></div><br class=""><blockquote type="cite" class=""><div class=""><div dir="auto" class=""><div class="">Additionally it might be useful to show the impact on the grammar.</div><div class=""><div class=""><div class="">Regards</div>(From mobile)</div>On Jun 2, 2016, at 7:42 AM, Austin Zheng via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:<br class=""><br class=""></div><blockquote type="cite" class=""><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class="">Excellent.<div class=""><br class=""></div><div class="">I put together a PR with a revised proposal containing the core team's recommended approach. If anyone is curious they can see it here: <a href="https://github.com/austinzheng/swift-evolution/blob/ef6adbe0fe09bff6c44c6aa9d73ee407629235ce/proposals/0095-any-as-existential.md" class="">https://github.com/austinzheng/swift-evolution/blob/ef6adbe0fe09bff6c44c6aa9d73ee407629235ce/proposals/0095-any-as-existential.md</a></div><div class=""><br class=""></div><div class="">Since this is the de-facto second round discussion thread, I'll start with my personal opinion (which is *not* reflected in the PR): the '&' separators in lieu of commas are a good idea, but I would still prefer the types to be wrapped in "Any<>", at least when being used as existentials.</div><div class=""><br class=""></div><div class="">My reasons:</div><div class=""><br class=""></div><div class="">- Jordan Rose brought up a good point in one of the discussion threads today: a resilience goal is to allow a library to add an associated type to a protocol that had none and not have it break user code. If this is true whatever syntax is used for existentials in Swift 3 should be a valid subset of the generalized existential syntax used to describe protocol compositions with no associated types.</div><div class=""><br class=""></div><div class="">- I would rather have "Any<>" be used consistently across all existential types eventually than have it only be used for (e.g.) existential types with `where` constraints, or allowing two different representations of the same existential type (one with Any, and one without).</div><div class=""><br class=""></div><div class="">- I think any generalized existential syntax without delimiting markers (like angle braces) is harder to read than syntax with such markers, so I would prefer a design with those markers.</div><div class=""><br class=""></div><div class="">Best,</div><div class="">Austin</div><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Jun 1, 2016, at 10:17 PM, Chris Lattner <<a href="mailto:clattner@apple.com" class="">clattner@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class=""><br class=""><blockquote type="cite" class="">On Jun 1, 2016, at 9:53 PM, Austin Zheng <<a href="mailto:austinzheng@gmail.com" class="">austinzheng@gmail.com</a>> wrote:<br class=""><br class="">This was indeed a very thorough review by the core team. I'll prepare a v2 proposal with this feedback taken into account so we can continue moving things along.<br class=""><br class="">One quick question - is making whatever syntax is chosen for Swift 3 "forward-compatible" with a future generalized existential feature a concern?<br class=""></blockquote><br class="">Yes it is a concern, but we assume that the “X & Y” syntax will always be accepted going forward, as sugar for the more general feature that is yet to be designed.<br class=""><br class="">-Chris</div></div></blockquote></div><br class=""></div></div></blockquote><blockquote type="cite" class=""><div class=""><span class="">_______________________________________________</span><br class=""><span class="">swift-evolution mailing list</span><br class=""><span class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a></span><br class=""><span class=""><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a></span><br class=""></div></blockquote></div></div></blockquote></div><br class=""></body></html>