> On Sep 28, 2016, at 3:22 AM, Cao Jiannan via swift-users > <swift-users@swift.org> wrote: > > Should I use private or fileprivate to declare global variables/consts in > Swift 3? e.g. > > fileprivate let a = 1 > fileprivate class SomeClass { > fileprivate b = 0 > } > > or > > private let a = 1 > private class SomeClass { > fileprivate b = 0 > } > > Thanks! > > If they are identity, then I think the Swift team should tell us which is > better.
They aren't identical. Here's a good explanation: http://useyourloaf.com/blog/swift-3-access-controls/ HTH, Dave Reed _______________________________________________ swift-users mailing list swift-users@swift.org https://lists.swift.org/mailman/listinfo/swift-users