[swift-users] private vs. fileprivate on global declaration in Swift3?
Quinn "The Eskimo!"
eskimo1 at apple.com
Thu Sep 29 03:30:56 CDT 2016
On 28 Sep 2016, at 17:18, Nevin Brackett-Rozinsky via swift-users <swift-users at swift.org> wrote:
> To answer the original question: at file scope the access modifiers `private` and `fileprivate` have exactly the same effect. It does not matter which of them you use there.
Right, but that doesn’t tell you which one you /should/ use. Personally I’d probably go for `fileprivate` because it seems more explicit to me, but I’d be interested in hearing other opinions.
Share and Enjoy
--
Quinn "The Eskimo!" <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
More information about the swift-users
mailing list