-
I perused threads when this kind of syntax was being discussed. Are the results documented somewhere? I don't know how to write all the things now.
-
Is there shorthand syntax coming for metatypes that will match the look of
any P.type…
struct S: P { }
protocol P { }
func ƒ(_ source: any P.Type) { }
…but deal with a concrete metatype instead?
func ƒ<T: P>(_ source: T.Type) { }
func ƒ(_ source: some P.Type) { } // doesn't compile
Edit: Maybe it's (some P).Type? I have to think about the parens differences here.
- Is there some way to refer to an "existential container which can store any concrete metatype", when the container is not
Any?
S.self is Any // true
S.self is P // false
(I'm still looking for a way to replicate the old behavior.)