Referring to array element by descriptive name

albert-j via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Jan 14 07:11:40 PST 2017


Is it possible to refer to an array element by a descriptive 
name, just for code clarity, without performance overhead? E.g.

void aFunction(double[] arr) {
     double importantElement = arr[3];
     ... use importantElement ...
}

But the above, I suppose, introduces an extra copy operation?



More information about the Digitalmars-d-learn mailing list