<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>On Dec 10, 2017, at 13:01, Chris Lattner via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>&gt; wrote:<br></div><blockquote type="cite"><div><div><br class=""><blockquote type="cite" class=""><div class="">On Dec 10, 2017, at 6:00 AM, Brent Royal-Gordon 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; line-break: after-white-space;" class=""><div class=""><blockquote type="cite" class=""><div class="">On Dec 9, 2017, at 10:32 AM, Xiaodi Wu 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=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">On Sat, Dec 9, 2017 at 11:20 Steven Brunwasser &lt;</span><a href="mailto:sbrunwasser@gmail.com" style="font-family: Helvetica; font-size: 12px; 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-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">sbrunwasser@gmail.com</a><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">&gt; wrote:</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><div class="gmail_quote" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;"><div dir="auto" class=""><div class="">Just wanted to give my 2¢</div><div class=""><br class=""></div><div class="">¢</div><div class="">I don’t like empty protocols—they feel like an abuse of the feature.</div></div></blockquote><div dir="auto" class=""><br class=""></div><div dir="auto" class="">As has been discussed here before, protocols aren’t about bags of syntax but rather about semantics. Empty protocols are explicitly a demonstration of this settled principle and are very much consistent with the direction of Swift.</div></div></div></blockquote></div><div class=""><br class=""></div><div class="">I also think it should be an attribute.</div><div class=""><br class=""></div><div class="">The last time I said this, I pointed out that this was a protocol which:</div><div class=""><br class=""></div><div class="">1. Has no formal members,</div><div class="">2. But imposes informal requirements enforced by the compiler,</div><div class="">3. Permits and uses arbitrary overloads, and</div><div class="">4. Cannot be usefully used in a generic context or as a type constraint,</div><div class=""><br class=""></div><div class="">None of which are true of ordinary protocols. Since then, we have added:</div><div class=""><br class=""></div><div class="">5. Can only be conformed to in the main declaration.</div><div class=""><br class=""></div><div class="">This is looking less like a protocol by the day. The square-peg grooves in the round hole are getting deeper and more splintery with every revision.</div></div></div></blockquote><br class=""></div><div>Hi Brent,</div><div><br class=""></div><div>This approach definitely could work. &nbsp;I added it to the alternatives section with a breakdown of why I don’t think it’s the right direction:</div><div><a href="https://gist.github.com/lattner/b016e1cf86c43732c8d82f90e5ae5438#make-this-be-a-attribute-on-a-type-instead-of-a-protocol-conformance" class="">https://gist.github.com/lattner/b016e1cf86c43732c8d82f90e5ae5438#make-this-be-a-attribute-on-a-type-instead-of-a-protocol-conformance</a></div></div></blockquote><br><div><span style="background-color: rgba(255, 255, 255, 0);">I think the protocol vs attribute debate is more about what it means to be an attribute. I personally see attributes as eventually becoming a more extensible meta-programming tool, but that might not be the community’s consensus.</span><div><span style="background-color: rgba(255, 255, 255, 0);"><br></span></div><div><span style="background-color: rgba(255, 255, 255, 0);">Assuming that attributes are for meta-programming, this would make more sense as an attribute, since its a tool for dynamically resolving undefined symbols at compile-time.</span></div><div><span style="background-color: rgba(255, 255, 255, 0);"><br></span></div><div><span style="background-color: rgba(255, 255, 255, 0);">- Steve</span></div></div></body></html>