# Should access control on extensions be banned in Swift 6?

**URL:** <https://forums.swift.org/t/should-access-control-on-extensions-be-banned-in-swift-6/62605>\
**Category:** Discussion\
**Created:** [January 17, 2023, 11:38am UTC](https://forums.swift.org/t/should-access-control-on-extensions-be-banned-in-swift-6/62605 "2023-01-17T11:38:33Z")\
**Posts on this page:** 1\
**Showing post:** 17

<div class="post-metadata">

**Author:** ![xwu](https://avatars.discourse-cdn.com/v4/letter/x/b487fb/32.png) [@xwu](https://forums.swift.org/u/xwu)\
**Post date:** [January 20, 2023, 7:46pm UTC](https://forums.swift.org/t/should-access-control-on-extensions-be-banned-in-swift-6/62605/17 "2023-01-20T19:46:38Z")

</div>

> [@Jumhyn](#):
>
> members are as visible as the containing declaration by default (up to `internal`)”

The reasoning, as I understand it, was that extensions do not “exist” as an entity and thereby cannot “contain” their members. So instead, the notation `{{access-modifier}} extension` is a one-of-a-kind “shorthand” totally distinct from the visually similar `{{access-modifier}} {{type-introducer}}`.

Community members who argued against my pitch to remove this feature stated that, indeed, the requirement to write `public` in front of every public API is exactly what they want to use this feature to avoid. This is irreconcilable with the countervailing view that all public APIs should be annotated on the declaration itself, but the core team was unwilling to consider weighing in on this absent a consensus being reached.

---

_[View the full topic](https://forums.swift.org/t/should-access-control-on-extensions-be-banned-in-swift-6/62605)._
