> On Oct 2, 2017, at 1:31 PM, Slava Pestov via swift-evolution 
> <swift-evolution@swift.org> wrote:
> 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.
> 

Private @inlinable functions are useful. For example, you might want a helper 
function to be inlined into a public @inlinable function for performance, but 
you don't want that helper function to be called by outside clients directly. 

The restriction would then be "inlinable 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. 

Having said that, it should be fine to use "public @inlinable only" for now and 
consider relaxing the restriction later.


-- 
Greg Parker     gpar...@apple.com <mailto:gpar...@apple.com>     Runtime 
Wrangler


_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to