<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="">The compiler implicitly derives T: Equatable for enums without associated values, and IMO it'd be reasonable to extend this to other types and/or other protocols.<div class=""><br class=""></div><div class="">-Joe</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jan 19, 2016, at 11:37 AM, David Waite 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="">ErrorType’s magic is only for Objective-C interoperability, and only exposed by diving into compiler implementation-level protocols.<div class=""><br class=""></div><div class="">This seems like a case where some syntax consistency is needed between ‘code generation’ proposals (such as member wise initializers). If there was guidance on what an eventual macro system syntax could look like, this could be taken into account as well.</div><div class=""><br class=""></div><div class="">-DW</div><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Jan 19, 2016, at 11:36 AM, Jacob Bandes-Storch 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=""><div dir="ltr" class="">Yes: ErrorType.</div></div></blockquote><div class=""><blockquote type="cite" class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><div class="" style="word-wrap: break-word;">On Tue, Jan 19, 2016 at 10:21 AM, Sune Foldager&nbsp;<span dir="ltr" class="">&lt;<a href="mailto:cyano@me.com" target="_blank" class="">cyano@me.com</a>&gt;</span>&nbsp;wrote:<br class=""><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><div class="" style="word-wrap: break-word;"><span class=""><br class=""></span><div class="">Hm, I don’t think I like that. Are there other examples of magic protocols in Swift?</div></div></blockquote></div></blockquote></div></div></div></blockquote></div></div></div></div>_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-evolution<br class=""></div></blockquote></div><br class=""></div></body></html>