07: Access Control - The Saga Continues
There has been a ton of debate on the Swift Evolution mailing lists about access control in Swift. We share our thoughts on the situation.
Access Control Roller Coaster
- First came the private/fileprivate change (SE-0025): https://github.com/apple/swift-evolution/blob/master/proposals/0025-scoped-access-level.md
- Then came open (SE-0117): https://github.com/apple/swift-evolution/blob/master/proposals/0117-non-public-subclassable-by-default.md
- For the last few weeks, a faction in the community has been proposing undoing it (SE-0159): https://github.com/apple/swift-evolution/blob/master/proposals/0159-fix-private-access-levels.md
- Wow. Such email. Very list. https://twitter.com/swiftlybrief/status/846938309666492417
- Rejection email: https://lists.swift.org/pipermail/swift-evolution-announce/2017-April/000337.html
- Doug Gregor opens discussion for expanding private: https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20170403/034903.html
- David Hart, with a new proposal from Doug’s suggestions: https://github.com/apple/swift-evolution/pull/668
- Features shouldn't be designed and deliberated in isolation. Decisions need to be holistic and forward-thinking. It's the project management equivalent of ABI resilience. "Design Resilience".
- Robert Widmann's draft modules proposal: https://gist.github.com/CodaFi/cd66b7d70b5cd8e4e8b433fa2ace378a
- fileprivate access can be recreated by creating a private "utility submodule" containing declarations of at least internal access.
Thanks to this episode's sponsor, PerfectlySoft. Download the Perfect Assistant for free at http://perfect.org/en/assistant/