[swift-evolution] SE-0025: Scoped Access Level, next steps

Matt Whiteside mwhiteside.dev at gmail.com
Thu Mar 31 17:29:02 CDT 2016


> So, proposal one (and 1b), more technical sounding
> 
> public
> internal (or intramodule)
> intrafile
> private
`intrafile` and `intramodule` sound esoteric to me.

I like these ones better:

public
moduleonly
fileonly
private//aka, scopeonly? unfortunate that this isn’t automatically clear 



Tino’s suggestion is also interesting:

visible(public)
visible(module)
visible(file)
visible(scope)
visible(file, ModuleA, File.swift)

But I think the paren syntax suggested earlier is equivalent, and would be the clearest to both experienced and beginning developers:

public
private(module)
private(file)
private(scope)

If parens are a no-go, perhaps the following could work:

public
privatetomodule
privatetofile
privatetoscope

I’m not a huge fan of `fileprivate` or `moduleprivate`, because they seem like strange non-words.

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


More information about the swift-evolution mailing list