Apple on Monday released Swift 2.2, which offers quicker code and is the first official release of the language since it went open source late last year.
Described as a minor release, version 2.2 produces faster-running code, according to Apple. It includes changes such as allowing most keywords as argument labels; these labels serve as part of the interface to a Swift function, describing arguments and improving readability.
Another feature, tuple comparison operators, provides generic implementations of comparison operators for tuples up to a specific arity in the Swift standard library.
The new language-version build-configuration capability, meanwhile, should help keep code working across multiple versions of the language, even though Swift syntax may change across those versions.
Apple open-sourced Swift in December, and this is the first version to take contributions from the open source community. "The release includes contributions from 212 non-Apple contributors -- changes that span from simple bug fixes to enhancements and alterations to the core language and Swift Standard Library," said Apple’s Ted Kremenek.
Version 2.2 is available as part of the 7.3 release of Apple's Xcode IDE for development. In addition to OS X and iOS, it supports Ubuntu Linux. "The Linux port is still relatively new, and in this release does not include the Swift Core Libraries, which will appear in Swift 3," Kremenek said. "The port does, however, include LLDB and the REPL."
Likewise, the Swift Package Manager for managing the distribution of Swift code is still in an early stage of development and is not part of the 2.2 release.
This story, "Apple’s Swift 2.2 offers quicker code" was originally published by InfoWorld.