[swift-evolution] [Proposal] Nested extensions

Tony Arnold tony at thecocoabots.com
Fri Apr 14 05:39:22 CDT 2017

Hi Tino,

> On 14 Apr 2017, at 19:40, Tino Heth via swift-evolution <swift-evolution at swift.org> wrote:
> This concept tries to avoid all objections that were raised against the various modells (of course, it triggers fresh ones at the same time ;-), and because it is purely additive, it removes the pressure to address the current issues in Swift 4.

Sorry to be a (hopefully polite) ogre, but from my perspective, your proposal does not address nor nullify the issues with access modifier levels in Swift, and I don’t think you should be pitching it as a stop-gap. It could make the use of extensions consistent with other similar declarations, but ultimately the access modifier level issues remain. 

My questions:

- Can you clarify for me: does this proposal suggest allowing extensions on the enclosing type to be nested within the type declaration, or within other extensions on the original type? If so, can you please word that more clearly.

- I would like to see some examples of the proposed syntax included in your proposal (perhaps via a link to the markdown source on GitHub?). Best case and worst case examples would show what impact it will have on readability and file length when someone goes a bit nuts with this feature.

- Do you know how much work will be required to implement this change at this stage? Is it feasible within the bounds of the time remaining before Swift 4’s release?


Off-topic suggestion: Using the words “Simply” or “just” when describing work to be done by others is something that you should avoid (unless you’ve already implemented the feature and there’s a PR sitting on GitHub, ready to go). Removing those words allows the sentences to communicate the same ideas, but they no longer trivialise the size/scope of the work to be done during implementation.


At this stage, I’m really not sure whether I’d add my support for this proposal were it to go to review, but hopefully my comments are useful.



Tony Arnold
+61 411 268 532

ABN: 14831833541

More information about the swift-evolution mailing list