<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 5, 2017, at 9:32 AM, Joe Groff <<a href="mailto:jgroff@apple.com" class="">jgroff@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="Singleton" style="word-wrap: break-word; -webkit-nbsp-mode: space;"><div class=""><blockquote type="cite" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"><div class=""><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div class=""><blockquote type="cite" class=""><div class=""><div dir="auto" class=""><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br class="Apple-interchange-newline">The suggestion to have this semantics was originally my fault, I believe, and it arose from the observation that if we have 'inlinable' backed by a symbol in the binary, then we'd also want the 'must be emitted by client' attribute. I think 'must be emitted by client' is going to almost always be preferable for an inlinable function, though, so it's better to have the single attribute with this behavior, only constrained by backward deployment.</div></div></div></blockquote><br class=""></div><div class="">What is the use case of “must be emitted by client” attribute? If I imagine that the Swift 5 standard library is shipped in the OS, I can see cases where deprecated/legacy shims for Swift3/4 compatibility would be emitted into the client but not shipped in the OS. Those seem relatively obscure though.</div></div></div></blockquote><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class=""></div><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">You could just as easily pose the opposite question—what's the use case for a symbol in the dylib when the definition is visible to clients? Evaluating the tradeoffs, we feel like it's better not to unless backward compatibility demands it.</div></div></div></div></blockquote><br class=""></div><div>The behavior I’m proposing dovetails with the overall design of swift resilience progressive disclosure:</div><div><br class=""></div><div>1) You can be fast and loose with a symbol, so long as you don’t define it as public.</div><div>2) Making it public allows you to be fast and loose within your module, but you have to opt into guarantees for other modules.</div><div>3) You can ship your symbol as public, then grant additional guarantees (overridability/subclassability or inlinability) in a subsequent release after you gain experience with it.</div><div><br class=""></div><div>I think it is hugely problematic that transitioning from “public” to “inlinable public” would be an ABI break with your approach.</div><div><br class=""></div><div>I would much rather see a model where “public” can graduate to “inlinable public” in an ABI compatible way, but that there were a “alwaysinlined public” concept (with a sufficiently scary name) for power users that want the semantics that you’re arguing for.</div><div><br class=""></div><div>-Chris</div><div><br class=""></div><div><br class=""></div></body></html>