Skip to content

Commit 95610e7

Browse files
DougGregorbeccadax
authored andcommitted
Add a future direction on implementation hiding for internal/private imports
1 parent 3a80bb2 commit 95610e7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

proposals/nnnn-definition-visibility.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,10 @@ The `@export` attribute could be extended to support visibility-related descript
214214
public func f() { }
215215
```
216216

217+
### Implementation hiding for internal and private imports
218+
219+
One of the motivations for this proposal is implementation hiding for uses of `private` and `internal` imports. This motivation would be weakened by the [future direction in SE-0409](https://github.com/swiftlang/swift-evolution/blob/main/proposals/0409-access-level-on-imports.md#hiding-dependencies-for-non-resilient-modules) where the transitive dependencies from those imports are hidden, because one would no longer need to use `@export(interface)` to explicitly hide a transitive dependency. In such a case, `@export(interface)` would make explicit what would happen implicitly when the definition of such a function references something available via an internal import.
220+
217221
## Acknowledgments
218222

219223
Thank you to Andy Trick for the `@export` syntax suggestion.

0 commit comments

Comments
 (0)