# Status of ExistentialAny

**URL:** <https://forums.swift.org/t/status-of-existentialany/86746>\
**Category:** Discussion\
**Created:** [May 15, 2026, 9:32pm UTC](https://forums.swift.org/t/status-of-existentialany/86746 "2026-05-15T21:32:51Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![alanzeino](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/alanzeino/32/1548_2.png) [@alanzeino](https://forums.swift.org/u/alanzeino)\
**Post date:** [May 15, 2026, 9:32pm UTC](https://forums.swift.org/t/status-of-existentialany/86746/1 "2026-05-15T21:32:51Z")

</div>

I was just migrating our codebase to support MemberImportVisibility when I noticed that the ExistentialAny page mentions "This will become the default in a future language mode.":

> **[Documentation](https://docs.swift.org/compiler/documentation/diagnostics/upcoming-language-features/)**

For context, we have approximately 49k protocol definitions in our Swift codebase, so doing a migration to add missing `any` keywords where needed may be a bit of a large effort. We also use warnings-as-errors.

Is it still on the roadmap to make this flag the default? Should we start this migration now and save ourselves some time down the road, or wait, in case the flag will work differently?

---

<div class="post-metadata">

**Author:** ![Cyberbeni](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/cyberbeni/32/46241_2.png) [@Cyberbeni](https://forums.swift.org/u/Cyberbeni)\
**Post date:** [May 16, 2026, 10:01am UTC](https://forums.swift.org/t/status-of-existentialany/86746/2 "2026-05-16T10:01:07Z")

</div>

It's already the default in Swift 6 mode.

---

<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:** [May 16, 2026, 1:44pm UTC](https://forums.swift.org/t/status-of-existentialany/86746/3 "2026-05-16T13:44:05Z")

</div>

Not so:

> [@Progress toward the Swift 6 language mode](https://forums.swift.org/t/progress-toward-the-swift-6-language-mode/68315/1):
>
> The Language Steering Group has decided that one previously-accepted upcoming feature, `ExistentialAny`, will **not** be enabled by default in Swift 6. [SE-0335: Introduce existential `any`](https://github.com/apple/swift-evolution/blob/main/proposals/0335-existential-any.md) introduces the `any` keyword to identify existential types. The proposal also specifies that "bare" protocol names will no longer be permitted as types---they must either use `any` or `some`, as appropriate---under the upcoming feature flag `ExistentialAny`. Given the concerns about migration to consistent use of existential `any` in the language, and the expectation that additional language improvements will be coming that might affect the end result of that migration, the Language Steering Group is deferring the source-incompatible changes in SE-0335 to a future language revision.

If it were my codebase, I wouldn't devote a large effort to devising your own processes and infrastructure to migration existing uses at this point. It's well understood that requiring `ExistentialAny` across the board would benefit from some sort of migration tooling or at least better guidance.

Now, if you truly need the dynamism of `any`, I doubt you'll regret using the new syntax _going forward_. But part of the benefit _to users_ of requiring `ExistentialAny` is that we (or some of us) surmise that a fair amount of existential usage _doesn't actually_ require the dynamism and _could_ be replaced with generics or opaque types more performantly—put another way, we think having `P` mean `any P` encouraged users to write less optimal code by default.

It would therefore be self-defeating if we simply encouraged everyone to mechanically sprinkle `any` everywhere in their codebases. So we deferred switching `ExistentialAny` to be on by default until we could have a chance to think through what a smarter migration path would look like and what additional language features or migration tooling that might involve.

---

<div class="post-metadata">

**Author:** ![johnno1962](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/johnno1962/32/6805_2.png) [@johnno1962](https://forums.swift.org/u/johnno1962)\
**Post date:** [May 16, 2026, 2:10pm UTC](https://forums.swift.org/t/status-of-existentialany/86746/4 "2026-05-16T14:10:33Z")

</div>

There was some discussion of migration tools in this thread [Existential Any migration Script - #14 by johnno1962](https://forums.swift.org/t/existential-any-migration-script/67875/14). I personally think it is time this proposal was formally withdrawn to avoid confusion. It can always be re-introduced at a later date.

---

<div class="post-metadata">

**Author:** ![Slava\_Pestov](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/slava_pestov/32/30204_2.png) [@Slava\_Pestov](https://forums.swift.org/u/Slava_Pestov)\
**Post date:** [May 18, 2026, 6:07pm UTC](https://forums.swift.org/t/status-of-existentialany/86746/5 "2026-05-18T18:07:48Z")

</div>

> [@xwu](#):
>
> Now, if you truly need the dynamism of `any`, I doubt you'll regret using the new syntax _going forward_. But part of the benefit _to users_ of requiring `ExistentialAny` is that we (or some of us) surmise that a fair amount of existential usage _doesn't actually_ require the dynamism and _could_ be replaced with generics or opaque types more performantly—put another way, we think having `P` mean `any P` encouraged users to write less optimal code by default.

Also for this exact reason, I would recommend that when starting a new project, users consider always enabling ExistentialAny. :) In my opinion, seeing the relationship between existentials and generics made explicit at the syntactic level makes the trickier parts of the language easier to reason about, and in the worst case where everything is `any` anyway and you don't end up wanting generics, it's just a few more keywords here and there than before.
