Array Appenders

grauzone none at example.net
Tue Apr 7 07:54:40 PDT 2009


bearophile wrote:
> Andrei Alexandrescu:
>> Denis Koroskin wrote:
>>> void append(T)(T[] array, ref size_t index, T value)
>> I'm pretty sure you meant to pass array by reference.
> 
> AH, that's the bug of mine I was talking about here:
> http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=87301

Never happened to me.

Anyway, finally introducing different types for slices and resizeable 
arrays could fix this. Just make it so that a resizable array is always 
passed by reference. Slices can stay the way they are.

> Bye,
> bearophile



More information about the Digitalmars-d mailing list