> On Dec 20, 2017, at 12:54 PM, Charlie Monroe via swift-evolution > <swift-evolution@swift.org> wrote: > > the choice to make them non-exhaustive by default is not in line with > everything else in Swift - everything else is generally closed by default - > public (-> final in other modules), no access modified (-> internal), ...
It is precisely in line with the `public`/`open` split. They both come from the principle that the default behavior should bind library authors as little as possible. The default for public classes is non-subclassable because going from non-subclassable to subclassable doesn't break anything, but the opposite direction does; the default for enums should be non-exhaustive because going from non-exhaustive to exhaustive doesn't break anything, but the opposite direction does. -- Brent Royal-Gordon Architechies
_______________________________________________ swift-evolution mailing list swift-evolution@swift.org https://lists.swift.org/mailman/listinfo/swift-evolution