[Pre-Pitch] Import access control: a modest proposal

Reusing the access control markers in some form on import makes sense to me. However, the default behavior of import today is also the "wrong" one from the perspective of trying to minimize implicit API liabilities. Could we conceivably change the default behavior of import in a future language mode? One way we could potentially phase this in could be to start warning about import statements that don't specify a visibility in Swift 6, encouraging existing code to audit the visibility of their imports, and then changing the default in Swift 7 so that imports are implementation-only by default.

17 Likes