[Pitch] Light-weight same-type constraint syntax

I think this is a valid point. The reason why this new syntax is proposed is purely pragmatic, it accounts for the fact that other languages don't have all the distinctions between protocols and generic types Swift does, so unification of the syntax here helps us to archive multiple goals at the same time - make it simpler/concise to work with protocols, unify syntax for handling of generic/type constraints, in combination with other possible features mentioned in [Discussion] Easing the learning curve for introducing generic parameters - #8 by hborla it makes the language more intuitive, and helps with progressive disclosure for people switching from other languages. Also since the syntax is the same, that helps the type-checker to understand what people are trying to express and provide useful suggestions.

3 Likes