Swift 5.8
Swift 5.8 enables you to start incrementally preparing your projects for Swift 6 by using upcoming features. By default, upcoming features are disabled. To enable a feature, pass the compiler flag
-enable-upcoming-featurefollowed by the feature’s identifier.[…]
The result builder implementation has been reworked in Swift 5.8 to greatly improve compile-time performance, code completion results, and diagnostics. The Swift 5.8 result builder implementation enforces stricter type inference that matches the semantics in SE-0289: Result Builders, which has an impact on some existing code that relied on invalid type inference.
[…]
- SE-0274: Concise magic file names
- SE-0362: Piecemeal adoption of upcoming language improvements
- SE-0365: Allow implicit self for weak self captures, after self is unwrapped
- SE-0367: Conditional compilation for attributes
- SE-0368: StaticBigInt
- SE-0369: Add CustomDebugStringConvertible conformance to AnyKeyPath
- SE-0370: Pointer Family Initialization Improvements and Better Buffer Slices
- SE-0372: Document Sorting as Stable
- SE-0373: Lift all limitations on variables in result builders
- SE-0375: Opening existential arguments to optional parameters
- SE-0376: Function Back Deployment
As of SE-0269, implicit
selfis permitted in closures whenselfis written explicitly in the capture list. We should extend this support toweak selfcaptures, and permit implicitselfas long asselfhas been unwrapped.
In this article I’m going to walk you through the most important changes this time around, providing code examples and explanations so you can try it all yourself.
Previously: