<html><head><style>body{font-family:Helvetica,Arial;font-size:13px}</style></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><div><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;"><div dir="auto" style="zoom: 1;"><div class="bloop_container"><div class="bloop_frame"><blockquote type="cite" style="font-family: 'helvetica Neue', helvetica;"><div dir="ltr">I alway enjoy hearing your ideas.<div><br></div><div>This is quite interesting. It's basically a way to define an ad-hoc interface that a type doesn't need to explicitly declare it conforms to. I know Golang works similarly; if a Go type implements all the requirements of an interface it conforms automatically.</div></div></blockquote><blockquote type="cite" style="font-family: 'helvetica Neue', helvetica;"><div dir="ltr"><div><br></div><div>There are positives and negatives to allowing this sort of ad-hoc interface.</div></div></blockquote><div style="font-family: 'helvetica Neue', helvetica;"><br></div><div style="font-family: 'helvetica Neue', helvetica;">Agree. It would definitely make the language "feel" a bit more fluid. But it doesn't add any expressive power and could have undesirable consequences.</div><br style="font-family: 'helvetica Neue', helvetica;"><blockquote type="cite" style="font-family: 'helvetica Neue', helvetica;"><div dir="ltr">This would make for a good standalone proposal -- both because it's complex enough to deserve its own discussion, and because if the community is interested someone would have to work through all the implications in order to put together a proposal. It would be quite a big change.</div></blockquote><div style="font-family: 'helvetica Neue', helvetica;"><br></div><div style="font-family: 'helvetica Neue', helvetica;"><span style="background-color: rgba(255, 255, 255, 0);">I don't see how this is different from a protocol other than the lack of requirement to declare conformance explicitly. The need to explicitly declare conformance is a design decision that I believe the core team feels pretty strongly about. </span></div><div style="font-family: 'helvetica Neue', helvetica;"><span style="background-color: rgba(255, 255, 255, 0);"><br></span></div><div style="font-family: 'helvetica Neue', helvetica;"><span style="background-color: rgba(255, 255, 255, 0);">That said, it hasn't been debated by the community yet so if someone feels strongly about dropping explicit conformance declarations it might be worth pitching the idea, if for not other reason than to have a discussion about it on the lost.</span></div></div></div></div></blockquote></div><p>I don’t see any desire to follow Go’s path here and drop explicit conformance in any way.</p><p>Basically such `existential` mechanism could express more than `Any<…>` could. That said I do feel that this "could“ have some potential to exist alongside `Any<…>`.</p><p>From my understanding of this whole existential type thing is that it can be used both ways, explicitly and implicitly. As said before we only discussed the explicit existential types.</p><p><br></p><p>Just another pseudo example:</p><p>```swift</p><p>// this could also replace typealiases for (generic) existentials</p><p>existential CrazyView {</p><p> // we could introduce a way for constraints which could have a nice looking syntax</p><p> // break `Any<…>` nesting and long very long composition lines of `Any<…>` </p><p> constraint Any<UIScrollView, Any<UITableView, Any<UIView, ProtocolA>>></p><p> constraint ProtocolA.AssociatedType == Int </p><p> func crazyFunction()</p><p>}</p><p><br></p><p>existential AnyCollection<T> {</p><p> constraint Collection</p><p> constraint Collection.Element == T</p><p>}</p><p>```</p><div>But I don’t want to go any further if there is no need (yet).</div></div> <br> <div id="bloop_sign_1464293870604892928" class="bloop_sign"><div style="font-family:helvetica,arial;font-size:13px">-- <br>Adrian Zubarev<br>Sent with Airmail</div></div> <br></body></html>