Spliterator flags as enum (was Initial java.util.Spliterator putback) (original) (raw)

Tim Peierls tim at peierls.net
Thu Mar 28 17🔞51 UTC 2013


I can't find a discussion of why Spliterator flags are ints rather than enum. The only thing coming close is this months-old update from Brian:

Sept 25, 2012 - Oct 24, 2012

*... **Stream flags improvements (Paul). *Added an "encounter order" flag. Define flags with an enum. Make flags into declarative properties of Ops, where an op can declare that they preserve, inject, or clear a given flag, and move responsibility for flag computation into AbstractPipeline. Pass flags to wrap{Sink,Iterator} so they can act on the current set of flags.

But that was in another country, and besides, the Ops are dead. Is there anything more recent about this? I'm prepared to hear that it's for performance reasons, but there should at least be a record of the process through which this was determined.

--tim



More information about the core-libs-dev mailing list