Indexing access for Lists and Maps considered harmful?

Neal Gafter neal at gafter.com
Tue Jun 23 14:42:40 PDT 2009


On Tue, Jun 23, 2009 at 1:55 PM, Shams Mahmood <shams.mahmood at gmail.com>wrote:

> So,
> List<String> list = new ArrayList();
> list[1] = list[0] = "value";
> would get translated to:
> Collections.set(list, 1, Collections.set(list, 0, "value"))


The link to methods in Collections is a bit too magical (e.g. it won't
gracefully handle anything other than the collections API nor will it
gracefully support evolution of the platform).



More information about the coin-dev mailing list