www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Re: Array Appenders

reply bearophile <bearophileHUGS lycos.com> writes:
Andrei Alexandrescu:
 Denis Koroskin wrote:
 void append(T)(T[] array, ref size_t index, T value)


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 Bye, bearophile
Apr 07 2009
parent grauzone <none example.net> writes:
bearophile wrote:
 Andrei Alexandrescu:
 Denis Koroskin wrote:
 void append(T)(T[] array, ref size_t index, T value)


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

Apr 07 2009