<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 4 Oct 2017, at 14:33, Slava Pestov <<a href="mailto:spestov@apple.com" class="">spestov@apple.com</a>> wrote:</div><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div class="">@_versioned makes a symbol visible externally without making it visible from the language. There is no requirement that a @_versioned thing is @inlinable. It is used when you want to reference an internal function from an inlinable function. Eg,</div><div class=""><br class=""></div><div class="">internal func myImplDetail() { … }</div><div class=""><br class=""></div><div class="">@inlinable public func myPublicFunction() { myImplDetail() } // error!</div><div class=""><br class=""></div><div class="">—</div><div class=""><br class=""></div><div class=""><div class="">@_versioned internal func myImplDetail() { … }</div><div class=""><br class=""></div><div class="">@inlinable public func myPublicFunction() { myImplDetail() } // OK</div></div><div class=""><br class=""></div><div class="">Slava</div></div></div></blockquote></div><div><br class=""></div><div class="">From my language user point of view it would be more understandable if that was written with a single keyword, eg:</div><div class="">@nonABI internal func myImplDetail() { }</div><div class="">@nonABI public func myPublicFunction() { myImplDetail() } // OK</div><div class=""><br class=""></div><div class="">Anyway, for my use case mentioned earlier (shipping a release version of my app bundle), that doesn’t really matter. I’d just like a compiler switch that made the whole module not having an ABI, essentially making all all methods and types @inlinable and @_versioned, using the terminology in your example.</div><div class=""><br class=""></div><div class="">My other observation is that no matter how great the ergonomics, and no matter the naming of these attributes, very few people outside the compiler team is going to be able to successfully ship a versioned library without the “Checking Binary Compatibility” tool mentioned in <a href="https://github.com/apple/swift/blob/master/docs/LibraryEvolution.rst#checking-binary-compatibility" class="">https://github.com/apple/swift/blob/master/docs/LibraryEvolution.rst#checking-binary-compatibility</a>.</div><div class=""><br class=""></div><div class="">/Jonas</div><div class=""><br class=""></div></body></html>