<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Mar 6, 2017, at 7:10 PM, Philippe Hausler via swift-dev <<a href="mailto:swift-dev@swift.org" class="">swift-dev@swift.org</a>> 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=""><br class=""></div><div class=""><br class="">On Mar 6, 2017, at 5:59 PM, Greg Parker <<a href="mailto:gparker@apple.com" class="">gparker@apple.com</a>> wrote:<br class=""><br class=""></div><blockquote type="cite" class=""><div class=""><meta http-equiv="Content-Type" content="text/html charset=us-ascii" class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Mar 6, 2017, at 5:48 PM, Philippe Hausler via swift-dev <<a href="mailto:swift-dev@swift.org" class="">swift-dev@swift.org</a>> 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? </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) <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 class="">Weak definitions are expensive. What are you trying to do?</div><div class=""><br class=""></div></div></blockquote><div class=""><br class=""></div><div class="">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></div></div></blockquote></div><br class=""><div class="">Could you be more specific about how you're trying to apply weak definitions to the problem?</div><div class=""><br class=""></div><div class="">-Joe</div></body></html>