T[new]

Sergey Gromov snake.scaly at gmail.com
Mon Aug 10 05:04:08 PDT 2009


Sun, 09 Aug 2009 13:29:21 -0700, Walter Bright wrote:

> D has a number of subtle problems (performance and semantic) that arise 
> when arrays are resized. The solution is to separate resizeable array 
> types from slices. Slices will retain the old:
> 
>     T[] slice;
> 
> syntax. Resizeable arrays will be declared as:
> 
>     T[new] array;

Good news.  I'm all for it.  The T[new] syntax is a bit... weird... bit
I'm OK with it as well.  Thanks!



More information about the Digitalmars-d mailing list