Parameterized Extensions

Well I personally don‘t like the idea of shadowing a type like this. That just shows that the generic type from the where clause should probably be implicitly public from the start.

In the above example I see a few issues:

  • it‘s shadowing the type for all the nested types and members
  • typealias T = T is strange, probably even for the compiler itself

Edit: Here is the potentially somewhat related thread. It‘s 3 years old so I need to re-read it to recall why I wanted this feature, and how exactly is related.

1 Like