Swift language plans for 2023 emphasize concurrency and generics

Builders of the Apple-developed Swift language intend to also move the language forward in C++ interoperability and add a Swift parser.

Swift’s plans for 2023 were cited in a Swift.org blog post on November 18. A newly formed language working group is emphasizing progress in concurrency to complete Swift’s support for strict data isolation provided by Sendable and actors. Plans include closing thread-safety holes, such as those around global variables and certain cross-actor calls. The language also may be fitted with features to solve usability problems arising with strict isolation.

For generics, the language working group intends to work on the variadic generics language feature, initially focusing on designing the core language model and implementing compiler and runtime infrastructure to support it. One early milestone would be allowing tuple types to conditionally conform to protocols such as Equatable when their elements do.

Other efforts cover ownership, with development of features to give programmers control ownership of values in memory and add basic support for non-copyable types to improve performance. Also, macros are eyed to further enable development of rich libraries and DSLs. The language workgroup is planning to finalize expected language revisions for the upcoming Swift 6 language mode.

For C++ interoperability, plans call for stabilizing interoperability features for using C++ from Swift, including owned value types, trivial value types, and API patterns such as foreign reference types and iterators. Builders also would stabilize how Swift value types, reference types, and functions are exposed to C++.

Compiler development teams, meanwhile, are working on improving compiler interaction with the build system. For the package registry, development of package manager emphasizes work on an open source package registry server implementation in concert with the community.

Other efforts eyed for Swift in 2023 include:

  • Development of a parser written in Swift and feature-complete with the current C++ implementation; eventually, the C++ parser would be replaced
  • Improving both type-checking performance and code completion reliability
  • Generation of less code when converting functions and when copying and destroying complex structs
  • AI/ML plans that cover robustness and performance, including improving performance of compiled code using Differentiable Swift

Swift builders have previously emphasized generics capabilities in the language. Interoperability with C++ also already has been on the Swift radar screen. Demand for Swift itself, founded in 2014, was found diminishing in a recent developer skills report from HackerRank.

Swift builders have recently formed four work groups for the language:

  • The language interoperability group to evolve the language and standard library
  • C++ interoperability group to incubate language proposals for interoperating with C++
  • A website group to manage swift.org
  • A documentation group to organize development of documentation tools and libraries

New workgroups join longstanding workgroups for Swift on the server and diversity. The formation of other workgroups is being considered, such as one for improving Swift usability across platforms.

Copyright © 2022 IDG Communications, Inc.

How to choose a low-code development platform