RFR(m): 8139233 add initial compact immutable collection implementations
Alan Bateman
Alan.Bateman at oracle.com
Thu May 5 12:34:09 UTC 2016
On 05/05/2016 01:28, Stuart Marks wrote:
>
> Hi Alan,
>
> Yes, the unpredictability does introduce some risk of intermittent and
> hard-to-diagnose failures. On the other hand, the
> unspecified-but-mostly-stable iteration order we have with things like
> HashMap lets implicit order dependencies creep into code, which makes
> such failures even more rare and harder to diagnose. Plus, as hard as
> we try to make iteration order stable, there the times we make changes
> that do change the iteration order. Then, everything breaks.
>
> The goal here is to expose code that uses these collections to more
> frequent order changes in order to "toughen" it up by flushing out
> inadvertent order dependencies. That way, we can change the
> implementation at will without worrying about changes to iteration
> order. We'll see if this works.
>
> I can add an option to change the iteration order on every iteration,
> if you think that'll help. :-)
I understand the goal, just wondering if there is something less devious
that would make sense here. One idea is to use some portion of the
Version, say the build number, so that it at least changes each week or
build. That would at keeping the ordering consistent from run to run but
it might change when someone updates.
-Alan
More information about the core-libs-dev
mailing list