list literal gotcha and suggestion
Florian Weimer
fw at deneb.enyo.de
Wed Sep 30 12:46:44 PDT 2009
* Gene Ray:
> "Rare"?
>
> In my experience, Sets are not rare in well-written code; they're
> only rare in code where for whatever reason the developer has
> refused to use them, and instead expends effort and CPU time
> iterating through an array or ArrayList to achieve the equivalent
> functionality. Encouraging this sort of behavior further by
> including only Lists in the new syntax is not a good plan.
At least in JDK 6, the HashSet and TreeSet are wrappers around the
corresponding maps. If there were more users, there would be a
compelling reason to reimplement them without superfluous value
references. 8-)
More information about the coin-dev
mailing list