digitalmars.D - Re: The demise of T[new]
- Kagamin <spam here.lot> Oct 19 2009
Walter Bright Wrote:The purpose of T[new] was to solve the problems T[] had with passing T[] to a function and then the function resizes the T[]. What happens with the original?
Why do you need such feature built into language? So many proposals to implement this feature and that feature in a library, and unable to implement reftype array?We both feel that this would simplify D, make it more flexible, and remove some awkward corner cases like the inability to say a.length++.
You write it as if you can do it with T[new].
Oct 19 2009