Lifting the "Self or associated type" constraint on existentials

The limitations are because of missing implementation details and incomplete language design rather than any fundamental difference. Where there are complications of the sort Dave raises, where an existential has a different set of behavior or methods from conforming types, that doesn’t even really arise because of associated types, really, but because of covariance and contravariance. It’s been an unfortunate byproduct of the “self or associated type” restriction that it’s introduced this confusion.

14 Likes