> On Mar 23, 2017, at 1:21 PM, Matthew Johnson <[email protected]> wrote: > > If we wanted to allow code like this to be written we wouldn’t need a new > keyword to do it. You are proposing two things here: > > 1) Allow stored properties in same-module extensions. This has been > discussed in the past and is a possibility, but I suspect it is not in scope > for consideration during Swift 4. > 2) Change the meaning of `private` to not mean lexical scope anymore, but > instead be lexical scope or an extension of the type introducing the lexical > scope in the same module. Changes to access control other than the proposal > currently under review are out of scope for Swift 4.
Neither, actually: 1) I’m proposing we no longer encourage extensions at all for this purpose. My proposal is simply to allow breaking up declarations into parts, instead. 2) I’m not proposing changing the meaning of ‘private’ here. Since partial implementations would all glom into one lexical scope, all the current access control rules would apply as they currently do. This is simply a way to write a class or struct declaration in multiple parts, without having to use extensions. Charles
_______________________________________________ swift-evolution mailing list [email protected] https://lists.swift.org/mailman/listinfo/swift-evolution
