www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Re: T[new] misgivings

Andrei Alexandrescu Wrote:

 Paradoxically this seems to be conducive to subtle efficiency issues. 
 For example, consider:
 int[new] a;
 a = [1, 2, 3];
 What should that do?

a = new Appender!int([1,2,3]); What you describe is more like StringBuilder, and, yes, things like that require full-blown API.
Oct 19 2009