Bracket notation for collections

Mark Thornton mthornton at
Wed Mar 25 13:53:52 PDT 2009

I notice that Joe Darcy has this on his todo list. I wonder if it might 
stretch to something like this:

interface Matrix2d {
   @arrayGet double get(int i, int j);
   @arraySet void set(int i, int j, double value);


Matrix2d m;
double z = m[1,2];

m[2,4] = 2*z;

Would the use of annotations for such a purpose be permitted?

Mark Thornton

More information about the coin-dev mailing list