Programming Languages: A Massive Update Has Just Arrived For Apple’s Swift
Apple has released Swift 5.5, the latest version of its open source programming language for building apps on iOS, macOS, and other platforms.
Apple announced Swift 5.5 in June at its annual WWDC developer conference with flagship features like “Swift Concurrency” for asynchronous and concurrent programming, improved management and distribution of packages, and standard library packages.
One notable change was that developers can now retrieve packages from a search screen in Xcode, Apple’s IDE, or the integrated development environment. So-called “package collections,” or selected lists of packages, facilitate the distribution and consumption of collections of packages for specific uses. The Swift 5.5 Package Manager also added support for package collections.
SEE: Programming languages: the new developer in residence of Python and his role of “make-it-or-break-it”
Apple unveiled Swift in 2014 as a modern replacement for Objective-C, and it quickly became a staple programming language for building apps for iOS and macOS computers.
Tiobe, which regularly publishes a list of the most popular languages, argued that Swift adoption is hampered by the availability of languages that support cross-platform mobile development.
Nonetheless, the Swift Project says that Swift 5.5 is a “massive release”.
Swift isn’t just for Apple hardware. It is available to develop applications that target Windows 10 as well as Apple’s Arm-based Macs, Linux servers, and AWS’s Lambda serverless platform.
Apple has also promised major performance improvements in Swift 5.5 through incremental imports that reduce the number of files to recompile when imported modules change. This allows developers to take a modular approach to a software project and reduce barriers to performance.
SEE: Get ready for iOS 15 and iPadOS 15
Another strong point is the concurrency interoperability with Objective-C, which bridges the concurrency features of Swift such as its asynchronous functions with Objective-C.
“It is intended to allow the wealth of existing asynchronous Objective-C APIs to be immediately usable with the Swift concurrency model,” explain Swift contributors.
Swift 5.5 also promises major improvements in memory management, with changes in Xcode 13 allowing Swift programs to reclaim memory faster. Automatic Reference Counting or ARC relies on the Swift compiler to automatically free memory when it is not needed.
This release also introduces another Swift type called “Actors,” or a reference type that protects access to its mutable state.