[swift-evolution] [REVIEW] SE-0193 - Cross-module inlining and specialization
Slava Pestov
spestov at apple.com
Wed Dec 20 21:34:11 CST 2017
Hi Nevin,
Thanks for taking the time to review the proposal!
> On Dec 20, 2017, at 7:08 PM, Nevin Brackett-Rozinsky via swift-evolution <swift-evolution at swift.org> wrote:
>
> Alternatively, since the “@abiPublic” attribute allows objects to be used by inlined code, why not spell it “@inlinable”?
>
Because both @abiPublic and @inlinable can be applied to functions, and we really do need to distinguish the two cases — they’re definitely not the same:
private func pf() {}
@abiPublic func af() {
pf() // OK — we can reference a private function here
// framework author can change the body of af() and clients see the new body
}
@inlinable public func if() {
pf() // error!
af() // OK
// changes made here don’t necessarily get picked up by clients until recompiled
}
Slava
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20171220/199b11cd/attachment.html>
More information about the swift-evolution
mailing list