The problem with syntax of "existential protocol" and "protocol" is that
the first should actually be default, and easier to write.
We should prefer static to dynamic. It is as if "structs" had to be
declared as "static class", or "let" variables as "const var". Shorter
keywords should be used for enforcing good practices.
Additionally, 95% of standard library protocols are actually "existential
protocols", or "protocols" in my notation.
Next, I don't know any language which has "existential" keyword. Moreover,
"existential types" in Haskell mean means (roughly) "type that can hold
value of any instance of class with type erasure", and that is exactly what
an interface is in Swift. So, I think that if we will add "existential"
keyword, we would add it the other way: for dynamically dispatched types.
I also personally like the "trait - protocol" naming. Traits are used to be
statically dispatched things in other languages, and protocols are
dynamically dispatched things from Objective-C. Actually, I'm satisfied
with any pair unless dynamic protocols get shorter names.
The problem with syntax of "existential protocol" and "protocol" is that the first should actually be default, and easier to write.
We should prefer static to dynamic.
These two statements seem to be in conflict: existentials create dynamic polymorphism, while generics create static polymorphism.
It is as if "structs" had to be declared as "static class", or "let" variables as "const var". Shorter keywords should be used for enforcing good practices.
Additionally, 95% of standard library protocols are actually "existential protocols", or "protocols" in my notation.
Next, I don't know any language which has "existential" keyword. Moreover, "existential types" in Haskell mean means (roughly) "type that can hold value of any instance of class with type erasure", and that is exactly what an interface is in Swift. So, I think that if we will add "existential" keyword, we would add it the other way: for dynamically dispatched types.
I also personally like the "trait - protocol" naming. Traits are used to be statically dispatched things in other languages, and protocols are dynamically dispatched things from Objective-C. Actually, I'm satisfied with any pair unless dynamic protocols get shorter names.