The demise of T[new]

downs default_357-line at yahoo.de
Mon Oct 19 07:08:45 PDT 2009


Walter Bright wrote:
> 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.

Is there any reason the first can't be a short-hand for the second?



More information about the Digitalmars-d mailing list