<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div><br></div><div><br>On Mar 6, 2017, at 5:59 PM, Greg Parker &lt;<a href="mailto:gparker@apple.com">gparker@apple.com</a>&gt; wrote:<br><br></div><blockquote type="cite"><div><meta http-equiv="Content-Type" content="text/html charset=us-ascii"><br class=""><div><blockquote type="cite" class=""><div class="">On Mar 6, 2017, at 5:48 PM, Philippe Hausler via swift-dev &lt;<a href="mailto:swift-dev@swift.org" class="">swift-dev@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="">Is there a way to mark a function in swift (on Linux) to use the same emission strategy as weak declarations in c?&nbsp;</div><div class=""><br class=""></div><div class="">I was to tinkering with some ideas on fixing some poor behavior in swift-corelibs-foundation and weak would potentially solve this specific case.</div><div class=""><br class=""></div><div class="">For reference this is the syntax I am interested in (since it is a bit obscure)&nbsp;<a href="https://en.m.wikipedia.org/wiki/Weak_symbol" class="">https://en.m.wikipedia.org/wiki/Weak_symbol</a></div></div></div></blockquote><br class=""></div><div>Weak definitions are expensive. What are you trying to do?</div><div><br class=""></div></div></blockquote><div><br></div><div>I was trying to prototype some fixes for factory pattern initializers. The other strategy that I was considering was using hoisting of functions to init methods but that didn't seem to work with disparate types. This wasn't really intended to be a real solution but more so a proof of concept.</div><br><blockquote type="cite"><div><div><br class=""></div><div>--&nbsp;</div><div>Greg Parker &nbsp; &nbsp; <a href="mailto:gparker@apple.com" class="">gparker@apple.com</a>&nbsp; &nbsp; &nbsp;Runtime Wrangler</div><div><br class=""></div><div class=""><br class=""></div></div></blockquote></body></html>