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

Dany St-Amant dsa.mls at icloud.com
Sat Mar 19 09:35:49 CDT 2016


> Le 15 mars 2016 à 09:07, Ilya Belenkiy via swift-evolution <swift-evolution at swift.org> a écrit :
> 
> These names are very uniform, and the context is immediately clear, but they are very long. The 2 most commonly used (and spelled out) would be access(global) and access(scope), public and private are much shorter and are well established terms of art.

An option which goes against Swift being as explicit as possible is to support abbreviated scope, in addition to the full name:

access(g)
access(m)
access(f)
access(s)

For the last one, it may be easier if it was access(local) and access(l).

On first encounter, these gmfl may be a bit puzzling, but they should be no harder to remember than the rwx of Unix file accessibility.

Dany

> On Tue, Mar 15, 2016 at 8:54 AM Антон Жилин <swift-evolution at swift.org <mailto:swift-evolution at swift.org>> wrote:
> My take at it:
> 
> access(global)
> access(module)  // default
> access(file)
> access(scope)
> 
> Very uniform. Argument to `access` is visibility scope

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


More information about the swift-evolution mailing list