3 ms·
The whole thing is about polymorphism, but Swift calls that generics. Similarly “function specialization” is Swift lingo for monomorphization. The part about m
by slavapestov 4y ago
The whole thing is about polymorphism, but Swift calls that generics. Similarly “function specialization” is Swift lingo for monomorphization.
The part about module boundaries is what allows separately-compiled and updated shared libraries to work (like the frameworks in the OS). There’s an @inlinable attribute to publish a function’s body to clients, but then if you update the library it won’t be picked up until clients are recompiled (which might be fine, for example a lot of standard library collection algorithms and so on are inlinable).