<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">Le 3 déc. 2017 à 09:29, Jose Cheyo Jimenez &lt;<a href="mailto:cheyo@masters3d.com" class="">cheyo@masters3d.com</a>&gt; a écrit :</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=""></div><div class=""><br class=""></div><div class=""><br class="">On Dec 2, 2017, at 11:46 PM, Jean-Daniel &lt;<a href="mailto:mailing@xenonium.com" class="">mailing@xenonium.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=""><br class=""><blockquote type="cite" class=""><div class="">Le 3 déc. 2017 à 04:58, Jose Cheyo Jimenez via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; a écrit :</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="">Hi Chris,&nbsp;<div class=""><br class=""></div><div class="">Thank you for pushing this forward.</div><div class=""><br class=""></div><div class="">My only comment is that on the declaration side it would be great to also have an attribute to communicate that compiler magic is happening.</div><div class=""><br class=""></div><div class="">Currently it is surprising that a regular looking protocol is providing me so much power.</div><div class=""><br class=""></div><div class="">Suggestions:&nbsp;</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; line-height: normal; font-family: Menlo; color: rgb(4, 51, 255); background-color: rgb(255, 255, 255);" class="">@dynamic</div><div style="margin: 0px; line-height: normal; font-family: Menlo; color: rgb(52, 149, 175); background-color: rgb(255, 255, 255);" class=""><span style="color: #0433ff" class="">struct</span><span style="" class=""> PyVal : </span>MemberLookupProtocol<span style="" class=""> {...}</span></div><div style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255); min-height: 14px;" class=""><br class=""></div><div style="margin: 0px; line-height: normal; font-family: Menlo; color: rgb(4, 51, 255); background-color: rgb(255, 255, 255);" class="">@dynamic</div><div style="margin: 0px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""><span style="color: #0433ff" class="">struct</span> ParameterSummer : <span style="color: #3495af" class="">DynamicCallable</span> {...}</div><div style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255); min-height: 14px;" class=""><br class=""></div><div style="margin: 0px; line-height: normal; font-family: Menlo; color: rgb(0, 143, 0); background-color: rgb(255, 255, 255);" class="">// Error: This type needs the @dynamic attribute.</div><div style="margin: 0px; line-height: normal; font-family: Menlo; color: rgb(52, 149, 175); background-color: rgb(255, 255, 255);" class=""><span style="color: rgb(4, 51, 255);" class="">class</span><span style="" class=""> ParamWinter : </span>MyCustomCallableProtocolOrClassOrTypeAlias<span style="" class=""> {...}</span></div></div><div class=""><br class=""></div><div class="">By requiring @dynamic (Or other attribute name), people can know that this is a compiler dynamic declaration and not just some random protocol whose name starts with Dynamic*. :)</div><div class=""><br class=""></div></div></div></blockquote><div class=""><br class=""></div><div class="">I’m not fond of the idea of an attribute. This introduce redundancy. </div></div></div></blockquote><br class=""><blockquote type="cite" class=""><div class=""><div class=""><div class="">What a declaration means if the attribute is missing ? &nbsp;</div></div></div></blockquote><div class="">Won’t compile?</div><br class=""><blockquote type="cite" class=""><div class=""><div class=""><div class="">What this attribute will mean on an other declaration ?</div></div></div></blockquote>Won’t compile?<div class=""><br class=""></div><div class="">It would be similar to the swift 4 mode where @objc is required in some declarations.&nbsp;</div></div></div></blockquote><div><br class=""></div>No it isn’t.</div><div>Like with @NSManagedObject, the very same declaration can exist with or without the @objc attribute depending the context, and the behavior of the function change. Neither is true with the @dynamic proposal.</div><div><br class=""></div><div><br class=""></div></body></html>