I don't like slices in D

bearophile bearophileHUGS at lycos.com
Fri Oct 18 07:32:38 PDT 2013


Adam D. Ruppe:

>     arr.length = arr.length - 1; // arr.length-- won't compile 
> due to silliness

This code now compiles, the bug was fixed:


void foo(ref int[] arr) {
     arr.length--;
}
void main() {}


Bye,
bearophile


More information about the Digitalmars-d mailing list