On 05/22/2010 12:20 PM, bearophile wrote:
BCS:
Maybe the style rule should be: dynamic arrays and AA's should be passed
as const or ref.

Something like that must be enforced by the compiler, or the design of 
arrays/AAs must be changed.

Bye,
bearophile

It's not a very good rule anyway:

void inc_all(int[] xs) {
    foreach (ref x; xs) {
        x += 1;
    }
}

Wouldn't gain anything from ref, and wouldn't work with const.

Reply via email to