[swift-evolution] [Proposal][Discussion] Modular Swift

Jonathan Hull jhull at gbis.com
Tue Feb 21 01:07:26 CST 2017

> On Feb 20, 2017, at 10:51 PM, Robert Widmann <devteam.codafi at gmail.com> wrote:
>> On a side note, I do think that people will quickly want a way to reference a particular submodule boundary with access modifiers.  It may not be part of this proposal, but it is somewhat inevitable.  We should consider that as we consider this proposal…
> Modules are not types, access control makes no sense here.  APIs may be exported (or not) across module boundaries, but modules themselves are not arbitrary programming constructs nor do we consider them to carry semantic weight as in some other ML-likes.  A public module is no different from a private module if you can import it.  A private module is no different from a public one if you cannot.

What I mean is that someone will eventually want to expose a member within a submodule that is a parent of the innermost submodule, but not make it public.  They will want to say something like ‘private(ModuleName)’.  Note, I am not proposing that syntax, just that it is an inevitable thing that people will ask for…

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170220/7daf4b1c/attachment.html>

More information about the swift-evolution mailing list