[swift-evolution] [RFC] "Library Evolution Support in Swift ('Resilience')"

Brent Royal-Gordon brent at architechies.com
Wed Feb 10 20:01:48 CST 2016


>> It is legal to change the implementation of an inlineable function in the next release of the library. However, any such change must be made with the understanding that it may or may not affect existing clients.
> 
> I think this is wrong.

I don't think there's a reasonable alternative. Breaking someone's entire app because a library changed is not acceptable unless you *know* there's a problem, and checking if some specific piece of inlined code has been replaced so you can fall back to a non-inlined call is likely to be more costly than just emitting a non-inlined call would be.

I think the solution is that you shouldn't mark security-critical code as being eligible for inlining. Anything else is just not going to be workable.

-- 
Brent Royal-Gordon
Architechies



More information about the swift-evolution mailing list