[External] : Re: ReversibleCollection proposal

Peter Levart peter.levart at gmail.com
Thu May 20 07:27:31 UTC 2021


On 20/05/2021 08:35, dfranken.jdk at gmail.com wrote:
> I also think the proposal of Stuart is reasonable though, but it seemed
> to me that we had reached some sort of impasse in this discussion. As
> Remi points out, we have (default) methods which sometimes throw
> exceptions when they are implemented to signify they don't actually
> implement the given feature, but we also have interfaces which add new
> methods. So any choice we make here seems to be inconsistent with some
> choice we made in the past, but such is the nature of software
> development I guess.


I think progress is still possible. The discussion has shown some 
alternatives which are not better than new 
ReversibleCollection/ReversibleSet types. The discussion has raised some 
concerns about compatibility but they are not to hard to overcome 
(mostly just source-level). There is clearly a benefit from new types 
although migration to use them will not be fast. But it might be faster 
than we are used to. The most difficult was (and for some still is) a 
JDK 8 -> JDK 9 jump, but once you are on JDK 9+ it is relatively easy to 
follow latest JDK release. With LTS JDK 17 around the corner, I expect 
most production code which now runs on JDK 11 will relatively quickly 
migrate to JDK 17 just for improvements in JVM/GC if not for 
Language/APIs. I think adding these types will surely trigger some 
disturbance but nothing major.


Peter




More information about the core-libs-dev mailing list