Swift 6.3
Holly Borla and Joe Heck (Hacker News):
Swift 6.3 introduces the
@cattribute, which lets you expose Swift functions and enums to C code in your project. […]@calso works together with@implementation. This lets you provide a Swift implementation for a function declared in a C header[…][…]
Swift 6.3 introduces module selectors to specify which imported module Swift should look in for an API used in your code. If you import more than one module that provides API with the same name, module selectors let you disambiguate which API to use[…]
[…]
Provide pre-specialized implementations of a generic API for common concrete types using
@specialize.[…]
Guarantee inlining — a compiler optimization that expands the body of a function at the call-site — for direct calls to a function with
@inline(always).[…]
Expose the implementation of a function in an ABI-stable library to clients with
@export(implementation). This allows the function to participate in more compiler optimizations.
The Swift Evolution proposals are listed here.
I love that I can now name my module the same as the primary/only type of the module without making the module namespace unreachable.
Congrats to my Swift colleagues for #finally pushing
@cover the finish line! Been a long time coming.
Previously: