On Mon, 20 Nov 2023 17:20:14 GMT, Pavel Rappo <[email protected]> wrote:
>> While it is not _necessary_ to indicate that an enum implements
>> `Comparable`, it is permissible to state it explicitly, such as in `enum Foo
>> implements Comparable<Foo> { foo1, foo2 }`. which is a somewhat more
>> linguistic way of writing `/** The order of the constants is important. */
>> enum Foo { foo1, foo2 }`
>
>> Since any `enum` implements `Comparable`, it is not reasonable to say that
>> the order may be relied on "unexpectedly".
>
> What I mean is that not every enum client uses `compareTo()` or `values()[0]`
> and `values()[values().length - 1]` to get the opposite extremes of a certain
> enum class. Not every client uses `EnumSet.range`. However, given enough
> time, they likely, eventually will.
I believe I addressed your concerns in 2def7bf.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16714#discussion_r1399526842