As someone who was against SE-0025 and SE-0169 I agree with @Nevin's conclusions:
-
Pre-SE-0025,
privatemeantfileprivate, and soprivate extensionmeantfileprivate extension. -
With SE-0025 (but not SE-0169), @xwu's explanation is correct:
private extensionis effectively stillfileprivatebecause (a) applyingprivateto all members would have been useless, and (b) it was a goal (though not one I agreed with) to makefileprivaterare if people wanted it to be. Therefore, "privatemeans enclosing scope and that includes extensions, which are always at the top level of a file". -
With SE-0169,
privatefor all methods in an extension became meaningful again…but it would be a source-breaking change to have those methods not exposed to other types in the file. Perhaps that change should have been made in Swift 5 as a breaking change, and I'd be in favor of making that change the next time we break source compatibility, with a corresponding deprecation ofprivate extensionin favor offileprivate extensionin existing language modes when we do.