# Any Keyword for static variable

**URL:** <https://forums.swift.org/t/any-keyword-for-static-variable/56269>\
**Category:** Using Swift\
**Created:** [March 27, 2022, 4:45pm UTC](https://forums.swift.org/t/any-keyword-for-static-variable/56269 "2022-03-27T16:45:04Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![ksluder](https://avatars.discourse-cdn.com/v4/letter/k/eada6e/32.png) [@ksluder](https://forums.swift.org/u/ksluder)\
**Post date:** [March 28, 2022, 2:39am UTC](https://forums.swift.org/t/any-keyword-for-static-variable/56269/8 "2022-03-28T02:39:27Z")

</div>

> [@gwendal.roue](#):
>
> On the other way, the proposal was perfectly clear for meta types, so it helped me solving the `any P.Type` vs `(any P).Type` puzzle.
> 
> We just need explicit help for optionals.

If it’s easier to spell a metatype existential than an optional existential, [I think the design has optimized for the wrong use case](https://forums.swift.org/t/pitch-introduce-existential-any/53520/195).

> [@ksluder](#):
>
> I think this is a very strong indication that `any T` is not the best spelling for this feature. `Any<T>` has the built-in benefit of grouping via angle brackets. It is immediately clear that _and how_ `Any<T.Type>` is distinct from `Any<T>.Type` . Even if you don’t understand the nuances of metatypes, you can understand that one syntax names a type that wraps a `Type` object, while the other names a `Type` object that wraps an `Any` . If you encounter an error “ `Any<>` cannot be applied to `Type` objects”, you immediately know you how to fix it: move the `.Type` outside the angle brackets.

I’m tempted to define my own `struct Any<T>` and play around with the ergonomics.

---

_[View the full topic](https://forums.swift.org/t/any-keyword-for-static-variable/56269)._
