
I see the benefits of allowing other TypeVarLike as the default, but I suspect there are complexities and edge-case behaviors that are not contemplated or described in the PEP. A few comments about this section as it's currently written: * It says "they have to be of the same type". By "type", I presume that you mean TypeVar vs ParamSpec vs TypeVarTuple, right? The word "type" is a bit ambiguous here. * Is it allowed for the second type variable to be bound to some type that is parameterized by the first type variable? For example, T1 = TypeVar("T1"), T2 = TypeVar("T2", default=list[T1])? Or is this disallowed? * Can a default refer to a TypeVar scoped to an outer class or function? If not, why? * It says "must be used before in the signature of the class". This wording probably needs to be tightened up somewhat because the order in which TypeVars appear is not always the order in which they parameterize the class. The order can be explicitly overridden through the use of a Generic or Protocol. And if PEP 695 passes, it will always be explicit. * The section mentions only classes. Is it intended to work also with generic functions and type aliases? * There are two ways to specialize a generic type: explicitly (using a subscript expression) and through the use of a call expression, which uses the constraint solver to "solve" the type arguments. This section focuses on explicit specialization. Have you considered the impact on specialization through a call expression? Consider, for example, if T2 has a default type of T1. If the constraint solver doesn't produce a solution for T2, it presumably "adopts" the default type which is solved value of T1. What if the converse occurs (i.e. T1 has no solution but T2 does)? I'd feel more confident if someone were to prototype this feature in an existing type checker and work out all of the above edge cases and discover if there are any others. Is such an effort under way? -Eric