[Discussion] Easing the learning curve for introducing generic parameters

—Not to beat a dead horse, but I wonder if I’m wrong in this:

If the pitched syntax generalizing some to generic constraints is adopted, then who chooses the conforming type here:

protocol P { }
func f(_: some P) -> some P { }

…exactly parallels who chooses the subtype here:

class C { }
func f(_: C) -> C { }
8 Likes