Apple ha appena rilasciato la prima e nuova versione di Swift 3.0, che apporta tantissime novità per il lavoro degli sviluppatori.
Ecco la lista di tutte le novità codice, apportate da Apple.
Implemented proposals for Swift 3
- SE-0002: Removing currying
func
declaration syntax - SE-0003: Removing
var
from Function Parameters - SE-0004: Remove the
++
and--
operators - 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
Unmanaged
to useUnsafePointer
- 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
first(where:)
method toSequenceType
- 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-0049: Move @noescape and @autoclosure to be type attributes
- SE-0053: Remove explicit use of
let
from Function Parameters - SE-0054: Abolish
ImplicitlyUnwrappedOptional
type - 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-0069: Mutability and Foundation Value Types
- SE-0070: Make Optional Requirements Objective-C-only
- SE-0071: Allow (most) keywords in member references
- SE-0072: Fully eliminate implicit bridging conversions from Swift
- SE-0085: Package Manager Command Names
- SE-0094: Add sequence(first:next:) and sequence(state:next:) to the stdlib
Accepted proposals which do not have a complete implementation
This is the list of proposals which have been accepted for inclusion into Swift, but they are not implemented yet, and may not have anyone signed up to implement them. If they are not implemented in time for Swift 3, they will roll into a subsequent release.
- SE-0025: Scoped Access Level
- SE-0035: Limiting
inout
capture to@noescape
contexts - SE-0036: Requiring Leading Dot Prefixes for Enum Instance Member Implementations
- SE-0038: Package Manager C Language Target Support
- SE-0042: Flattening the function type of unapplied method references
- SE-0045: Add scan, prefix(while:), drop(while:), and iterate to the stdlib
- SE-0047: Defaulting non-Void functions so they warn on unused results
- SE-0048: Generic Type Aliases
- SE-0052: Change IteratorType post-nil guarantee
- SE-0060: Enforcing order of defaulted parameters
- SE-0063: SwiftPM System Module Search Paths
- SE-0066: Standardize function type argument syntax to require parentheses
- SE-0067: Enhanced Floating Point Protocols
- SE-0068: Expanding Swift
Self
to class members and value types - SE-0075: Adding a Build Configuration Import Test
- SE-0076: Add overrides taking an UnsafePointer source to non-destructive copying methods on UnsafeMutablePointer
- SE-0080: Failable Numeric Conversion Initializers
- SE-0081: Move
where
clause to end of declaration - SE-0082: Package Manager Editable Packages
- SE-0088: Modernize libdispatch for Swift 3 naming conventions
- SE-0092: Typealiases in protocols and protocol extensions
- SE-0093: Adding a public
base
property to slices - SE-0096: Converting dynamicType from a property to an operator
[via]