<div dir="ltr">I think it would make sense for the syntax to be explicit that something is being derived by the compiler. <a href="http://book.realworldhaskell.org/read/using-typeclasses.html#typeclasses.auto.derivation">Haskell uses "deriving"</a> for this. I'm not sure what it should look like in Swift (suggestions welcome), and I'm also not sure if it's worth figuring that out for the first version of this feature, or whether we'd be better off making that change later.<div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div>Jacob<br></div></div></div></div>
<br><div class="gmail_quote">On Tue, Jan 19, 2016 at 11:37 AM, David Waite <span dir="ltr"><<a href="mailto:david@alkaline-solutions.com" target="_blank">david@alkaline-solutions.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">ErrorType’s magic is only for Objective-C interoperability, and only exposed by diving into compiler implementation-level protocols.<div><br></div><div>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><span class="HOEnZb"><font color="#888888"><div><br></div><div>-DW</div></font></span><div><br><div><span class=""><blockquote type="cite"><div>On Jan 19, 2016, at 11:36 AM, Jacob Bandes-Storch via swift-evolution <<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>> wrote:</div><br><div><div dir="ltr">Yes: ErrorType.</div></div></blockquote></span><div><blockquote type="cite"><div dir="ltr"><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 style="word-wrap:break-word"><span class="">On Tue, Jan 19, 2016 at 10:21 AM, Sune Foldager <span dir="ltr"><<a href="mailto:cyano@me.com" target="_blank">cyano@me.com</a>></span> wrote:<br></span><span 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 style="word-wrap:break-word"><span><br></span><div>Hm, I don’t think I like that. Are there other examples of magic protocols in Swift?</div></div></blockquote></span></div></blockquote></div></div></div></blockquote></div></div></div></div></blockquote></div><br></div></div>