CONDITIONAL CONFORMANCES // Swift 4 extension Array: Equatable where Element: Equatable { // ERROR: Extension of type 'Array' with constraints // cannot have an inheritance clause } // Swift 5 extension Array: Equatable where Element: Equatable { var hashValue: Int { ... } } 12 — @basthomas
RECURSIVE CONSTRAINTS ON ASSOCIATED TYPES // Will not compile in Swift 4, will in Swift 5 protocol Sequence { associatedtype SubSequence: Sequence where Iterator.Element == SubSequence.Iterator.Element, SubSequence.SubSequence == SubSequence // Returns a subsequence containing all but the first 'n' items // in the original sequence. func dropFirst(_ n: Int) -> Self.SubSequence // ... } 13 — @basthomas
MEMORY OWNERSHIP MODEL > Partly implemented in Swift 4 (SE-0176: Enforce Exclusive Access to Memory) > Swift 5 takes on "only" everything that is needed for ABI stability 15 — @basthomas
SOURCE STABILITY GUIDELINES The current implementation must: > actively cause problems for users > be clearly better and must not conflict with existing Swift syntax > have a reasonably automated migration path for existing code 18 — @basthomas
PROPOSALS > String ergonomics > Improvements to existing standard library facilities > Foundation improvements > Syntactic additions > Laying the groundwork for a new concurrency model > ... and more? 20 — @basthomas
REFERENCES Swift 5.0 goals SE-0143: Conditional conformances SE-0157: Support recursive constraints on associated types SE-0176: Enforce Exclusive Access to Memory ABI Stability Manifesto Ownership Manifesto String Manifesto Chris Lattner's Concurrency Manifesto Moya Swift Weekly Brief Swift Unwrapped 25 — @basthomas