[swift-evolution] Pitch: Cross-module inlining and specialization

Slava Pestov spestov at apple.com
Tue Oct 3 01:27:56 CDT 2017


> On Oct 2, 2017, at 10:57 PM, Chris Lattner <clattner at nondot.org> wrote:
> 
> 1) Why not another level of access control?  There is a reasonable argument that what you’re doing is making something “more public than public” or that you’re making the “body also public”.  I’m not strongly in favor of this design approach, but if you agree, the doc should explain why you’re not in favor of it.

Oh, I forgot to address this point. I’m against this because even though this proposal says inlinable requires public, it is really orthogonal to public, because eventually we will have something like the current @_versioned attribute, where internal (or even private, as some have suggested) functions can be “public ABI”. For example,

@_versioned func myInternalDetails() {
  // …
}

@inlinable
public func myPublicFunction() {
  myInternalDetails() // I can reference this from an inlinable function, but users can’t call it directly
}

Slava
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20171002/64ac090b/attachment.html>


More information about the swift-evolution mailing list