Introduce Any<P> as a better way of writing existentials

At one point in history rust language was in the same place as swift now - they found out that using just the name of the trait (protocol) to denote the trait object (existential) is a bad idea.

Their solution was to use the word dyn which is similar to impl (their equivalent of some)
https://doc.rust-lang.org/edition-guide/rust-2018/trait-system/dyn-trait-for-trait-objects.html

I think we should use any (or maybe another short word) to preserve the symmetry, just like rust did

dyn Foo - impl Foo
any Foo - some Foo

12 Likes