> The one issue I see is sticking that public extension inside a private one.  
> I think you would have to mark ‘secret: Int’ as private instead of the 
> extension itself to allow the effect you are looking for…
I didn't think that much while writing the example, but this one was actually 
on purpose:
It's stated in the Swift documentation that the default visibility of members 
in an extension equals the level of the extension — so this use of extensions 
is also a way to group all public declarations (the other levels as well), and 
save some keystrokes.
_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to