Is there possible to support inheriting from a generic type: class classA<T: classB>: T?

Thanks for your detailed response. I can understand that supporting this feature would bring many impacts and some unknown risks and problems. It would be a great challenge to change something in a mature system. But I still think this feature is useful as we're seeing it in the C++ language. I don't know the underlying implementation of swift and also I have no any experiences about compiling. I just simply think:

  1. T should have a constraint with a class or protocol in this case, like my example: T must be a subclass of UIViewController or itself.
  2. When T is not unspecified, we can use its constraint to simply check MyBaseViewController implementation, e.g: its initializer, member functions, member variables. (I know the initializer checking is more complex than I thought)
  3. When T is specified, that means the whole implementation of MyBaseViewController<...> is determined, and then we can fully check if its codes and semantics are right.

Forgive my stupid thought, I just hope to see it in swift.