[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:14:26 PDT 2014


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

--- Comment #10 from Andrej Mitrovic <andrej.mitrovich at gmail.com> ---
(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.

--


More information about the Digitalmars-d-bugs mailing list