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
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
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
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