[swift-evolution] [Draft] Fix Private Access Levels
matthew at anandabits.com
Tue Feb 21 07:37:27 CST 2017
Sent from my iPad
> On Feb 21, 2017, at 5:45 AM, David Hart via swift-evolution <swift-evolution at swift.org> wrote:
>>> On 21 Feb 2017, at 11:40, Brent Royal-Gordon <brent at architechies.com> wrote:
>>> On Feb 20, 2017, at 10:58 PM, David Hart via swift-evolution <swift-evolution at swift.org> wrote:
>>> The scoped keyword is a good choice not only because the community has been calling this feature “scoped access control” all along, but also because the principle underlying all of Swift’s access levels is the idea of a scope.
>> I think the second part of this sentence undermines the argument for `scoped` as a keyword: if *all* access levels are about scope, then *this* access level should not be called `scoped`, because the keyword should describe what's *different* about this access level.
>> That's not to say "scoped" is a bad name, but I think it's good because the space inside curly braces can be thought of as a "scope". So I'd revise this sentence to something like:
>> The scoped keyword is a good choice not only because the community has been calling this feature “scoped access control” all along, but also because a variable's scope is traditionally restrained to the curly-brace-delimited block the variable is declared in, and that's the behavior `scoped` implements.
> I totally agree with you :) But that’s the part of the proposal that Matthew Johnson is supporting. If you come to an agreement, I’ll update the proposal.
I'll give some thought to rewording this section as soon as I can. Possibly tonight, possibly tomorrow.
>> Brent Royal-Gordon
> swift-evolution mailing list
> swift-evolution at swift.org
More information about the swift-evolution