Swift 3.0 Preivew 1 已發行 ( 英文 )13 Jun 2016
We are very pleased to announce Developer Preview 1 of Swift 3.0!
As described in the Swift 3.0 Release Process, developer previews (i.e., “seeds” or
“betas”) provide qualified builds of Swift 3 that are more stable than just
grabbing the latest snapshot of
master (i.e., tip-of-trunk development).
Developer previews capture Swift 3 as a work-in-progress and should not
be considered the final version of Swift 3 unless otherwise stated.
Implemented Swift Evolution Proposals
The following Swift Evolution proposals are newly implemented in Swift 3.0 Preview 1:
- SE-0002: Removing currying
- SE-0003: Removing
varfrom Function Parameters
- SE-0004: Remove the
- SE-0005: Better Translation of Objective-C APIs Into Swift
- SE-0006: Apply API Guidelines to the Standard Library
- SE-0007: Remove C-style for-loops with conditions and incrementers
- SE-0008: Add a Lazy flatMap for Sequences of Optionals
- SE-0016: Adding initializers to Int and UInt to convert from UnsafePointer and UnsafeMutablePointer
- SE-0017: Change
- SE-0019: Swift Testing
- SE-0023: API Design Guidelines
- SE-0028: Modernizing Swift’s Debugging Identifiers (__FILE__, etc)
- SE-0029: Remove implicit tuple splat behavior from function applications
- SE-0031: Adjusting inout Declarations for Type Decoration
- SE-0032: Add
- SE-0033: Import Objective-C Constants as Swift Types
- SE-0034: Disambiguating Line Control Statements from Debugging Identifiers
- SE-0037: Clarify interaction between comments & operators
- SE-0039: Modernizing Playground Literals
- SE-0040: Replacing Equal Signs with Colons For Attribute Arguments
- SE-0043: Declare variables in ‘case’ labels with multiple patterns
- SE-0044: Import as Member
- SE-0046: Establish consistent label behavior across all parameters including first labels
- SE-0047: Defaulting non-Void functions so they warn on unused results
- SE-0048: Generic Type Aliases
- SE-0049: Move @noescape and @autoclosure to be type attributes
- SE-0053: Remove explicit use of
letfrom Function Parameters
- SE-0054: Abolish
- SE-0055: Make unsafe pointer nullability explicit using Optional
- SE-0057: Importing Objective-C Lightweight Generics
- SE-0059: Update API Naming Guidelines and Rewrite Set APIs Accordingly
- SE-0061: Add Generic Result and Error Handling to autoreleasepool()
- SE-0062: Referencing Objective-C key-paths
- SE-0064: Referencing the Objective-C selector of property getters and setters
- SE-0065: A New Model For Collections and Indices
- SE-0066: Standardize function type argument syntax to require parentheses
- SE-0069: Mutability and Foundation Value Types
- SE-0070: Make Optional Requirements Objective-C-only
- SE-0071: Allow (most) keywords in member references
- SE-0085: Package Manager Command Names
- SE-0094: Add sequence(first:next:) and sequence(state:next:) to the stdlib
Swift 3.0 Preview 1 is available for free as part of Xcode 8 beta 1.
Linux (Ubuntu 14.04 and Ubuntu 15.10)
Official binaries for Ubuntu 14.04 and Ubuntu 15.10 are available for download on Swift.org.
Foundation and Linux (Core Libraries)
Not all of the
NS prefix removal changes have propagated to the Core Libraries implementation of Foundation APIs.
This should be resolved in a future beta.
Migrating to Swift 3
Swift 3 is a source-breaking release over Swift 2.2.1. It contains many syntactic refinements and improvements, but also a huge number of changes for how Objective-C APIs import into Swift due to SE-0005. Please consult the migration guide for guidance and tips for migrating to Swift 3.