<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=""><br class=""><div><blockquote type="cite" class=""><div class="">On Oct 2, 2017, at 2:20 PM, Greg Parker &lt;<a href="mailto:gparker@apple.com" class="">gparker@apple.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=us-ascii" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Oct 2, 2017, at 1:31 PM, Slava Pestov via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:</div><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><ul style="-webkit-print-color-adjust: exact; margin: 15px 0px; padding-left: 30px; font-family: Helvetica, arial, sans-serif; font-size: 14px; background-color: rgb(255, 255, 255);" class=""><li style="-webkit-print-color-adjust: exact; margin: 0px;" class=""><p style="-webkit-print-color-adjust: exact; margin: 0px 0px 15px;" class="">inlinable declarations can only reference other public declarations. This is because they can be emitted into the client binary, and are therefore limited to referencing symbols that the client binary can reference.</p></li></ul></div></div></div></blockquote></div><div class="">Private @inlinable functions are useful. For example, you might want a helper function to be inlined into a public @inlinable&nbsp;function for performance, but you don't want that helper function to be called by outside clients directly.&nbsp;</div><div class=""><br class=""></div><div class="">The restriction would then be "inlinable&nbsp;declarations can only reference other public declarations and other @inlinable non-public declarations". This relaxation would have no affect on ABI: only @inlinable things could be inlined, and only public things could be ultimately referenced by inlined things.&nbsp;</div><div class=""><br class=""></div><div class="">Having said that, it should be fine to use "public @inlinable only" for now and consider relaxing the restriction later.</div></div></div></blockquote><div><br class=""></div>That’s what @_versioned is currently for. You can define a function as @_versioned @_inlineable and reference it from other public inlinable functions, without making it visible to AST-level lookup.</div><div><br class=""></div><div>While I would prefer to punt formalizing &nbsp;this to a future proposal, we can still design the correct spelling and behavior of @_versioned here (I’m pretty sure the current attribute isn’t it).</div><div><br class=""></div><div>Slava</div><div><br class=""><blockquote type="cite" class=""><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class=""><br class=""></div><div class=""><br class=""></div><div class="">--&nbsp;</div><div class="">Greg Parker &nbsp; &nbsp; <a href="mailto:gparker@apple.com" class="">gparker@apple.com</a>&nbsp; &nbsp; &nbsp;Runtime Wrangler</div><div class=""><br class=""></div><div class=""><br class=""></div></div></div></blockquote></div><br class=""></body></html>