The demise of T[new]

Walter Bright newshound1 at digitalmars.com
Mon Oct 19 02:48:15 PDT 2009


Ary Borenszweig wrote:
> I remember seeing a lot of CTFE code that created a dynamic array and 
> then appended stuff to it, like for example to build a list of prime 
> numbers. Would that still work with ArrayBuilder?

Probably not. But you can rewrite:

   a ~= stuff;

as:

   a = a ~ stuff;

to make it work.



More information about the Digitalmars-d mailing list