Orderable vs Ordering
Brian Goetz
brian.goetz at oracle.com
Thu Feb 5 21:22:02 UTC 2026
This is all super speculative. Naming discussions are premature; many of these won’t even be proposed in the end.
Sent from my iPad
> On Feb 5, 2026, at 9:34 PM, Remi Forax <forax at univ-mlv.fr> wrote:
>
> Hello,
> taking a look to the type-class interfaces in java.lang,
> I think Orderable is not the right name, and will confuse people.
>
> The suffix "able" is usually used to describe the type itself, Iterable, Closeable,
> but here what we want is to describe is a witness which is outside and express a relation between two types.
>
> For me, Comparator can be the name of a witness while Comparable can not.
>
> So i'm voting for Ordering instead of "Orderable" but I'm not a native speaker so there is perhaps a better name.
>
> Also if you agree, the following line
> https://github.com/openjdk/valhalla/blob/type-classes/src/java.base/share/classes/java/lang/Orderable.java#L42
> should be @see Comparator.
>
> regards,
> Rémi
More information about the valhalla-dev
mailing list