Swift 5.4 released

Apple has just released Swift 5.4. This reduced version has code size and improves performance, especially in terms of protocol compliance checks at run time, thanks to a faster implementation of the hash table for caching previous search results. .

Apple also points out that back-to-back changes to the table now avoid redundant uniqueness checks, as this code snippet shows:

func foo(_ a: inout [Int]) {
  // Must do copy-on-write (CoW) check here.
  a[0] = 1
  // The compiler no longer generates
  // a redundant CoW check here.
  a[1] = 2

Swift 5.4 brings new linguistic features:

  • Support for multiple variadic parameters in functions, indices and initializers (SE-0284)
  • Extension of the syntax of implicit members (SE-0287)
  • Result generators (SE-0289)
  • Local functions supporting overload
  • Property wrappers for local variables

Finally, it should be noted that to pave the way for a new concurrency model, the compiler now issues a warning and a fix for unqualified uses of await as an identifier. These identifiers will be interpreted as the await keyword in a future version of Swift as part of SE-0296. 

Swift 5.4 released Swift 5.4 released Reviewed by bsm on May 02, 2021 Rating: 5

No comments:

Powered by Blogger.