[swift-evolution] [swift-evolution-announce] [Review] SE-0159: Fix Private Access Levels

Ben Rimmington me at benrimmington.com
Wed Mar 22 04:16:12 CDT 2017

> On 22 Mar 2017, at 03:16, Xiaodi Wu wrote:
>> On Tue, Mar 21, 2017 at 9:38 PM, Matthew Johnson wrote:
>>> On Mar 21, 2017, at 9:28 PM, Xiaodi Wu wrote:
>>> And couldn't this be enforced by a linter feature that warns if a private member beginning with _ is accessed outside of scope?
>> I don’t like to use naming conventions and linters to catch things that belong in the language proper.  Hasn’t the community agreed that we don’t want dialects of Swift?
> Very agreed. But is it a "dialect" when it's spoken by the standard library?

It's a shame the standard library can't use `fileprivate` and `private`, but the SDK overlays have the following usage:

$ egrep --include *.swift --recursive '\bfileprivate\b' ./stdlib/public/SDK
[47 results]

$ egrep --include *.swift --recursive '\bprivate\b' ./stdlib/public/SDK
[65 results, 8 of which are at file scope]

-- Ben

More information about the swift-evolution mailing list