Skip to content

Latest commit

 

History

History
143 lines (133 loc) · 16.9 KB

swift-3_0.md

File metadata and controls

143 lines (133 loc) · 16.9 KB

Swift 3.0 - Released on September 13, 2016

Swift 3 focused on solidifying and maturing the Swift language and development experience. It focused on several areas:

  • API design guidelines: The way in which Swift is used in popular libraries has almost as much of an effect on the character of Swift code as the Swift language itself. The API naming and design guidelines are a carefully crafted set of guidelines for building great Swift APIs.

  • Automatic application of naming guidelines to imported Objective-C APIs: When importing Objective-C APIs, the Swift 3 compiler automatically maps methods into the new Swift 3 naming guidelines, and provides a number of Objective-C features to control and adapt this importing.

  • Adoption of naming guidelines in key APIs: The Swift Standard Library has been significantly overhauled to embrace these guidelines, and key libraries like Foundation and libdispatch have seen major updates, which provide the consistent development experience we seek.

  • Swiftification of imported Objective-C APIs: Beyond the naming guidelines, Swift 3 provides an improved experience for working with Objective-C APIs. This includes importing Objective-C generic classes, providing the ability to import C APIs into an "Object Oriented" style, much nicer imported string enums, safer syntax to work with selectors and keypaths, etc.

  • Focus and refine the language: Since Swift 3 is the last release to make major source breaking changes, it is also the right release to reevaluate the syntax and semantics of the core language. This means that some obscure or problematic features will be removed, we focus on improving consistency of syntax in many small ways (e.g. by revising handling of parameter labels, and focus on forward looking improvements to the type system. This serves the overall goal of making Swift a simpler, more predictable, and more consistent language over the long term.

Swift 3 is the first release to enable broad scale adoption across multiple platforms, including significant functionality in the Swift core libraries (Foundation, libdispatch, XCTest, etc), portability to a number of platforms including Linux/x86, Raspberry Pi, and Android, and the Swift package manager to easily manage the distribution of Swift source code.

Finally, Swift 3 also includes a mix of relatively small but important additions to the language and standard library that make solving common problems easier and make everything feel nicer.

Evolution proposals included in Swift 3.0