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

Brent Royal-Gordon brent at architechies.com
Fri Mar 25 20:10:23 CDT 2016


> all of these names (public, internal, private, local) have specific meaning in the context of computer languages.

Yes, `local` has a meaning, but that meaning is generally *not* that it's an access level. It usually has something to do with declaring variables inside a function.

For instance, Perl uses it to back up and restore a global variable. ML uses it to create a scope (roughly). Lua and Julia use it to declare lexical variables which are visible in enclosed scopes, which SE-0025's new access level is specifically *not* supposed to allow.

I don't know of any language where `local` is used as an access level. If you're aware of an analogous use in another language, I'd be interested to see it. But the examples I've found if anything *undermine* the suggestion that `local` would be a good keyword choice.

-- 
Brent Royal-Gordon
Architechies



More information about the swift-evolution mailing list