Apple has released Swift 1.2 as part of Xcode 6.3 beta. The Swift team comments that this beta release includes a significantly enhanced Swift compiler, as well as new features in the Swift language itself.
On the compiler improvements front, the Swift 1.2 compiler was engineered to be more stable and to improve performance. These changes also provide a better experience when working with Swift in Xcode.
Some of the most visible improvements include:
- Incremental builds: Source files that haven’t changed will no longer be re-compiled by default, which will significantly improve build times for most common cases. Larger structural changes to code may still require multiple files to be rebuilt.
- Faster executables: Debug builds produce binaries that run considerably faster, and new optimizations deliver even better release build performance.
- Better compiler diagnostics: Clearer error and warning messages, along with new fix-its, make it easier to write proper Swift 1.2 code.
- Stability improvements: The most common compiler crashes have been fixed and developers should also see fewer SourceKit warnings within the Xcode editor.
Also in Swift 1.2, the language has been further refined to ensure safe, predictable behavior. Apple also continues to improve the interaction between Swift and Objective-C.
Of course, the standard bug fixes have been included in this beta. Swift 1.2 includes some source-incompatible changes that require updates to previous code and Xcode 6.3 includes a migrator to help automate the process.