Indexing access syntax for Lists and Maps
gkbrown at mac.com
Mon Jul 20 16:13:45 PDT 2009
I've just looked back through some recent threads to see what has
already been discussed. It seems like some consideration has been
given to both approaches (a hard association between the  operator
and List/Map as well as some form of operator overloading). Would
someone be willing to briefly summarize what is currently being
proposed for indexer access?
On Jul 20, 2009, at 5:39 PM, Greg Brown wrote:
> I'd like to separate the previous discussion into two threads, so
> the conversation regarding the merits of collection literals doesn't
> completely overshadow the other topic:
>> 1) Indexing access syntax for Lists and Maps
>> It would be nice to see this feature extended to any class, not just
>> List and Map. Groovy supports this by mapping the index operator to
>> getAt() and putAt() - a similar approach (possibly one that maps to
>> get(int)/set(int, E) and get(K)/put(K, V)) would be more flexible and
>> would still work for List and Map.
> How viable might this be?
More information about the coin-dev