Been following along for some time now, and wanted to offer a super straw-man idea for improving the syntax.
Would something like this work?
func dance<A, B>() ->
AssocType1 == A,
AssocType2 == Result<B, Swift.Error>> // assuming the Boogaloo happens :slight_smile:
It retains the conditional
where-clause flexibility (at the cost of extra generics admittedly), but also provides a bit of 'scope' to the relevant parts of the opaque type itself.
Also, is there ever a reason that you'd want to say, express opaque type of opaque types? That sort of context is not really distinguishable in the
_.assocType flavor. It seems like good information to have/not lose perhaps.
For instance, is this even meaningful to want?
func randomMatrix() -> opaque Collection<opaque Collection<Element: Double>>
Certainly such an idea is expressible unambiguously with a type erasers.