<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=""><br class=""><div><blockquote type="cite" class=""><div class="">On May 19, 2016, at 1:11 AM, Adrian Zubarev via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div id="bloop_customfont" style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; margin: 0px;" class="">Austin do we really need this 3rd proposal? This makes my original one really a waste of time. I was trying to solve <a href="https://openradar.appspot.com/20990743" class="">https://openradar.appspot.com/20990743</a> with the original `Any<>` proposal when Swift 3 ships. Your other proposal would enhance it without introducing breaking changes.</div><div id="bloop_customfont" style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; margin: 0px;" class=""><br class=""></div><div id="bloop_customfont" style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; margin: 0px;" class=""><div class=""><blockquote type="cite" class="clean_bq" style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">To that end, I’d suggest Any<>,Any<Any, XX>, and Any<Any<XX>> all cause warnings.</blockquote></div><p class="">Why would these cause warnings?</p><p class="">func foo(any: protocol<>)</p><p class="">func foo(any: protocol<Any>)</p><p class="">func foo(any: protocol<Any, ProtocolA>)</p><p class="">func foo(any: protocol<ProtocolA>)</p><p class="">Everything is already fine today.</p><div class=""><br class=""></div></div></div></blockquote><div>I assume you meant to use Any and not protocol above.</div><div><br class=""></div></div><div>They can all be interpreted, but:</div><div>- they provide multiple ways of expressing the same concept</div><div>- the additional uses of Any detract from code clarity</div><div>- it is possible (in the absence of an established design) that these syntaxes (particularly Any<Any<ProtocolA>>) might limit our ability to add existential types without either breaking existing code or adding special cases in the parser. I can go into more detail on my reasoning here, but that seems a diversion of this topic to do so.</div><div><br class=""></div><div>An example elsewhere in the language of otherwise valid code being rejected because the syntax is redundant:</div><div><br class=""></div><div>enum MyError:ErrorType, ErrorType {}</div><div><br class=""></div><div>I’m also specifically saying that the *syntax* should warn on the use of Any-within-Any. Code such as:</div><div><br class=""></div><div>typealias Foo = Any</div><div>typealias Bar = Any<Foo, Sequence></div><div><br class=""></div><div>would be fine.</div><div><br class=""></div><div>-DW</div></body></html>