[Issue 13556] inconsistent 'new' syntax for arrays

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Wed Oct 1 22:02:29 PDT 2014


https://issues.dlang.org/show_bug.cgi?id=13556

--- Comment #3 from Kenji Hara <k.hara.pg at gmail.com> ---
(In reply to bearophile_hugs from comment #1)
> I suspect that the array creation syntax is an unfixable mess.
> 
> new int[256][256] can also be generate a pointer to fixed size array
> int[256][256].

I think all dynamic array allocation should be writtten as:

    int[][](1, 2)

Current ambituity syntax new int[2][1] should be deprecated, removed,
and then we can reuse it for static array allocation.

--


More information about the Digitalmars-d-bugs mailing list