[swift-evolution] [Discussion] A Problem With SE-0025?

Sean Heber sean at fifthace.com
Wed Jun 29 10:46:18 CDT 2016


> On Jun 29, 2016, at 10:22 AM, Matthew Johnson via swift-evolution <swift-evolution at swift.org> wrote:
> 
> 
>> On Jun 29, 2016, at 10:08 AM, David Hart <david at hartbit.com> wrote:
>> 
>> Sorry if I wasn’t expressing myself well enough. In my original email, I said that:
>> 
>> > The new rules make `private` more prominent compared to `fileprivate` (the latter has a somewhat worse name).
>> 
>> So I agree that my issue is more with the naming than the functionality. I’m mainly complaining that because of its name, `fileprivate` feels like more of a special corner case of `private`. But in the style of writing types through extensions, `fileprivate` will become much more prevalent than `private`, which feels slightly backwards.
> 
> I don’t view it as more of a special corner case at all, but I can see why you feel that way since it has an unprecedented (AFAIK) and more verbose name.  
> 
> The proposal originally left `private` alone and used a new name for the new access level.  We weren’t able to find a name that didn’t have problems which led to the idea of renaming the existing `private`.
> 
> My perspective is that it’s just the best name we could come up with for the concept in the context of the various access levels we want to support.  The name isn’t intended to discourage use in any way.  

It may not be intended, but that doesn’t mean it won’t, though. :P

I can’t say exactly *why*, but I feel similar to David here in that “fileprivate” is such an… odd… name that I’m inclined to just not use it and let things default to “internal” instead. In fact, I have *already* caught myself doing this. I don’t know if that’s *bad* exactly (would more things being internal actually aid the compiler/optimizer?), but I think this is a valid concern. The issue here is rooted in psychology, not technology. :/

l8r
Sean



More information about the swift-evolution mailing list