On Thursday, 14 August 2014 at 18:07:57 UTC, bearophile wrote:
Meta:
Isn't that also the case for the auto*, const[], immutable[$],
etc. syntax? Conceptually it feels the same to me as Kenji's
enhancement; I don't know enough about the compiler to talk
about it technically.
One difference between Kenji's enhancement and the AA type
inference is that arr[$] length inference for arrays is useful
in many situations and it helps avoid some bugs and make the
code more DRY. So it's a different degree of usefulness.
Bye,
bearophile
Kenji also implemented functionality to allow all of the
following:
auto[] ai = new int[](3);
const* ci = new int(1);
immutable[$] = [1, 2, 3];