Steven Schveighoffer Wrote:

> Having seen quite a few incorrect descriptions of how D slices work  
> (particularly regarding appending), I wrote an article that tries to  
> describe how D slices work, and why they behave the way they do.

Still reading, but the example should use assertions which pass:

void main()
{
   int[] arr = new int[5];
   shrinkTo2(arr);
   assert(arr.length != 2); // Not expected!
}

It is good form because reading it will describe the outcome even without 
comment.

Reply via email to