> On Oct 13, 2016, at 1:25 AM, Jean-Daniel via swift-evolution
> <email@example.com> wrote:
> I don’t think monitoring the usage of private vs fileprivate is fair. By
> default, people will use private until they encounter visibility issues and
> discover they need to change to fileprivate. So private will probably being
> use far more than fileprivate.
> Nonetheless it does not mean people chosen private because it effectively
> reduce the visibility to the class scope, but just because it is easier to
> discover and to type than fileprivate and fit in many cases.
How is that an argument against private, though? If private is used far more
often than fileprivate, then this suggests that the vast amount of the time,
the scope it provides is what is appropriate. The enlarged scope provided by
fileprivate, then, is needed for what are essentially edge cases. It makes
little sense, to my mind, to replace the mainstream option with the niche one.
swift-evolution mailing list