Setting array length to 0 discards reserved allocation?
Jakob Ovrum via Digitalmars-d
digitalmars-d at puremagic.com
Sun Jul 27 02:10:24 PDT 2014
On Sunday, 27 July 2014 at 08:49:43 UTC, Jonathan M Davis wrote:
> As defined by the language, T[] is a dynamic array. As great as
> the article is, it was wrong in its use of the terminology, and
> that's what's caused a lot of the confusion and resulted in
> arguments over the difference between a dynamic array and a
> slice (there really isn't any). IIRC, both Walter and Andrei
> stated in that discussion that T[] is a dynamic array as far as
> D is concerned and that's not going to change. The article
> really should be updated to reflect the correct terminology. As
> far as D is concerned a slice and a dynamic array are the same
> thing when it comes to arrays. They're just different names for
> T[], and trying to treat them as different just causes
> confusion.
Conflating both concepts with the same name is why the article
was so dearly needed in the first place.
More information about the Digitalmars-d
mailing list