Reverse generics and opaque result types

I think one potential point of confusion is that a regular generic function can vary just in its return type:

func example<T: Numeric>() -> T

..which looks a lot like the "reverse generic":

func example<^T: Numeric>() -> T

So although I agree it can be useful to look at the complementary nature of generics and opaque result types, I think it's also important to emphasize their differences for the sake of readability.

2 Likes