Monday, April 3, 2023

Swift 5.8

Alexander Sandberg:

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-feature followed 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-0365:

As of SE-0269, implicit self is permitted in closures when self is written explicitly in the capture list. We should extend this support to weak self captures, and permit implicit self as long as self has been unwrapped.

Paul Hudson:

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:

Comments RSS · Twitter · Mastodon

Leave a Comment