On Tue, 28 Mar 2023 00:01:27 GMT, Stuart Marks <sma...@openjdk.org> wrote:
>> This change is absolutely massive, implementing reversed() basically doubles >> the number of implementations which means multiple years of debugging / spec >> fixing. >> >> Reversing a List makes sense, reversing a LinkedHashSet/LinkedHashMap is a >> nice to have. Having the concept of first and last >> (getFirst()/getLast()/etc) on Collection is something long awaited. >> >> I understand that wanting to separate the concept of Collection and >> SequencedCollection can be conceptually nice, but >> multiplying the number of interfaces also multiplies the number of >> implementations. Pragmatically, this patch is too big compared to how useful >> it is. >> >> I get that Oracle is rich, but this JEP is not only a burden for Oracle but >> for the whole community. > > @forax > > Funnily, I was thinking the other day that this change is quite small given > that I've been working on it for over two years. :-) > > Anyway, thanks for looking through the implementation. @stuart-marks, i read your message as not too not far from the sunken cost fallacy. I still believe that introducing an interface for the concept of sequenced collection makes this change far bigger that it could be. After all, there is no interface for non-null collections, read-only collections, non structurally modifiable collections or sorted collections, so why an interface for ordered collection ? ------------- PR Comment: https://git.openjdk.org/jdk/pull/7387#issuecomment-1487621122