I also wanted to throw in support for Drew’s addendum below.  It’s a feature 
I’ve come across the need more than once, and I don’t even write a lot of swift.

-Matt

> One thing I would like to see (perhaps out of scope for this proposal) is the 
> natural extension for generic parameters:
> 
> struct Box<T> {
>     var t: T
> }
> 
> extension Box where T == Int { //error: Same-type requirement makes generic 
> parameter T non-generic
> }
> 
> There is a great deal of overlap between associated types and generic 
> parameters, and it seems to me that it would be favorable to allow `==` with 
> both generic parameter operands and associatedtype operands for consistency.
> 
> Drew

_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to