On Mon, 10 Mar 2014 19:59:07 -0400, Walter Bright <newshou...@digitalmars.com> wrote:

On 3/10/2014 6:47 AM, Dicebot wrote:
(array literals that allocate, I will never forgive that).

It was done that way simply to get it up and running quickly. Having them not allocate is an optimization, it doesn't change the nature.

I think you forget about this:

foo(int v, int w)
{
   auto x = [v, w];
}

Which cannot pre-allocate.

That said, I would not mind if this code broke and you had to use array(v, w) instead, for the sake of avoiding unnecessary allocations.

-Steve

Reply via email to