RFC: draft API for JEP 269 Convenience Collection Factories
john.r.rose at oracle.com
Wed Oct 14 20:46:40 UTC 2015
On Oct 14, 2015, at 10:56 AM, Kevin Bourrillion <kevinb at google.com> wrote:
> Anyway, since we created these methods, they became an attractive nuisance,
> and thousands of users reach for them who would have been better off in
> every way using an immutable collection. Our fondest desire is to one day
> be able to delete them. So, obviously, my strong recommendation is not to
> add these to ArrayList, etc.
I agree with Kevin's warning here. Please, (1) make the immutable version easy to get (List.of not ImmutableList.of), and require users to thoughtfully opt into mutability (new ArrayList not ArrayList.of).
More information about the core-libs-dev