[swift-evolution] [Review] SE-0159: Fix Private Access Levels

Brent Royal-Gordon brent at architechies.com
Mon Mar 27 03:05:40 CDT 2017


> On Mar 26, 2017, at 9:37 PM, Charles Srstka via swift-evolution <swift-evolution at swift.org> wrote:
> 
> For your tiny helper type, you want it to be only visible to the type it helps. If it’s in a separate file, it has to be visible to the entire module.

Would it help to put the type in a separate file, but in an extension on the type it's helping? This would at least keep it out of the top level of the `internal` namespace, which might make people less likely to use it by accident (which I *think* is what you're trying to guard against here).

-- 
Brent Royal-Gordon
Architechies

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


More information about the swift-evolution mailing list