SE-0025: Scoped Access Level, next steps


(Thorsten Seitz) #1

I’d appreciate future extensions to private(submodule) very much!

The drawback with these is that they are quite lengthy, though (not because of typing but because of readability of the real meat, i.e. the declaration name).

-Thorsten

···

Am 15. März 2016 um 02:50 schrieb Joe Groff via swift-evolution swift-evolution@swift.org:

On Mar 14, 2016, at 6:47 PM, Ilya Belenkiy via swift-evolution swift-evolution@swift.org wrote:

I really like James’s idea:

private symbol visible within the current declaration (class, extension, etc).
private(module) symbol visible within the current module.
private(file) symbol visible within the current file.

this is very precise and crystal clear. All other already suggested names have room for interpretation. These are obvious at a glance.

I like this too. It also admits groupings between ‘file’ and ‘module’ in the future (‘directory’ or ‘submodule’ maybe), the lack of which has been often cited as another weakness in our current model.

-Joe


swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution