<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 Feb 1, 2017, at 3:01 PM, David Hart via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; 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=""><br class=""></div><div class="">On 1 Feb 2017, at 22:54, Douglas Gregor &lt;<a href="mailto:dgregor@apple.com" class="">dgregor@apple.com</a>&gt; wrote:<br class=""><br class=""></div><blockquote type="cite" class=""><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Jan 29, 2017, at 8:44 PM, Slava Pestov via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">This is a nice generalization of the existing protocol composition syntax. Implementation might get a little tricky — this touches a lot of things, such as inheritance clauses, constraints in generic signatures, and casts. It would require thorough testing.<div class=""><br class=""></div><div class="">There are also a few odd corner cases to sort out:</div><div class=""><br class=""></div><div class="">typealias T = SomeClass &amp; SomeProtocol</div><div class=""><br class=""></div><div class="">class C : T { // should we allow this? probably yes</div><div class="">}</div><div class=""><br class=""></div><div class="">protocol P : T { // should we allow this? probably no</div><div class="">}</div></div></div></blockquote><div class=""><br class=""></div>IIRC, we already allow the latter where T is a typealias for SomeProtocol1 &amp; SomeProtocol2. Why not allow it generally?</div></div></blockquote><div class=""><br class=""></div><div class="">Well what would it mean? A protocol can't inherit or conform to a class.</div></div></div></blockquote></div><br class=""><div class="">That anything which conforms to that protocol must subclass SomeClass?</div><div class=""><br class=""></div><div class="">- Dave Sweeris</div></body></html>