[Issue 6421] Require initialization of static arrays with array literals not to allocate
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sun May 4 04:16:13 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=6421
--- Comment #11 from rswhite4 at googlemail.com ---
(In reply to Andrej Mitrovic from comment #10)
> (In reply to rswhite4 from comment #9)
> > I would prefer float[3](1, 2, 3) instead of float[3]([1, 2, 3]). The latter
> > has too many parentheses.
>
> Easier on the eyes, sure. But the latter is simpler to interpret with
> multidimensional static arrays:
>
> float[2][3] = float[2][3]([[1, 2], [3, 4], [5, 6]]);
>
> I'm not sure what this would look like with the former syntax.
float[2][3]([1, 2], [3, 4], [5, 6]);
Three elements, each of them an array with two elements.
--
More information about the Digitalmars-d-bugs
mailing list