Why do you think the definition of Comparable<T> lacks an upper bound on T?
That is, why is it not defined as:
Comparable<T extends Comparable<?>>
or
Comparable<T extends Comparable<? super T>>
Wouldn't the latter two proposals be closer to the intended correct use of the interface?
The interface documentation starts with the following sentence, suggesting that it's intended to be used as T implements Comparable<T>:
This interface imposes a total ordering on the objects of each class that implements it.
Is it just for backward compatibility with pre-generic code?
Tdoesn't need qualification forComparable<T>to work. Your suggestions are limiting what T can be for no obvious reason.TandComparable<T>are different types. The latter offers a way to compare the former.Comparable<T>places no requirement onTto be anything:TandComparable<T>do not need to be in a (sub) class relationshipT implements Comparable<T>" Yes, but there is no way to declare it in Java to guarantee that an implementing classTwill implementComparable<T>In the way you suggested declaring it,interface Comparable<T extends Comparable<? super T>>, you can still declareclass Foo implements Comparable<Foo>and thenclass Bar implements Comparable<Foo>. That would be completely legal according to your declaration.