T[new] misgivings

Kagamin spam at here.lot
Mon Oct 19 01:54:06 PDT 2009


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.



More information about the Digitalmars-d mailing list