On Monday, 1 April 2013 at 08:42:45 UTC, Nicholas Smith wrote:
Ali, thanks for the justification. It makes enough sense, and
at least int[][](2, 3) matches the order in which you access
the elements.
I agree with Bearophile though that the syntax is very messy
when you're mixing array types and pre/postfix declarations. If
you weren't shooting for C family syntax I'm sure array
declarations could be handled more gracefully.
I think the idea is that a "new" syntax was introduced, which,
arguably, is better.
At the same time, the old syntax was kept, for compatibility.
Keeping both makes things complicated, and *mixing* both, well
that's just evil.
IMO, it is a convenient and simple syntax if you decide to keep
it that way. Just cause there are ways to make it complicated
doesn't mean it's a good idea to do it that way.
Just keep things consistent with what you are doing: Use new
style, and only new style in D code. Use old style (and only old
style), when interfacing with a C-api, or if the code was ported
from C.