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

[email protected] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #7 from [email protected] ---
(In reply to Kenji Hara from comment #3)
> (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.

Now D is used for a multidimensional array syntax :)

auto arrray = new int[][][][][][][][][][][](4, 8, 6, 13 /* ... The length of
the other subarrays on request */);

I suggest to implement such a syntax for declaring multidimensional arrays:

auto array = new int[11](4, 8, 6, 13 /* .... The length of the other subarrays
on request */);

P.S. The syntax for declaring multidimensional arrays, needs work!

--

Reply via email to