Hi Xiaodi,

Thanks for taking the time to look over the proposal.

> On Dec 20, 2017, at 7:01 PM, Xiaodi Wu via swift-evolution 
> <swift-evolution@swift.org> wrote:
> 
> Does this proposal fit well with the feel and direction of Swift?
> 
> Yes, with a caveat. It seems a little unfortunate that @inline(never) is 
> spelled so differently from @inlinable. Probably too late to rename the 
> former @noninlinable though. It'd be lovely though.

So @inline(never) is not the opposite of @inlinable, it is something completely 
different:

- @inline(never) impacts the optimizer’s behavior inside the module, where as 
@inlinable has no effect on callees inside a module.
- You can in fact define a function that is @inline(never) and @inlinable. This 
would allow the function to be specialized or otherwise emitted inside a client 
module, but neither the specialization nor the original function would ever be 
inlined.

I’d like the swift-evolution community to discuss @inline(never) and 
@inline(__always) at some point, but I think they’re sufficiently unrelated to 
this proposal that we should probably not try to fit them in.

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

Reply via email to