On Wednesday, 6 January 2021 at 14:03:14 UTC, Mathias LANG wrote:
On Wednesday, 6 January 2021 at 13:48:52 UTC, angel wrote:
On Wednesday, 6 January 2021 at 09:24:28 UTC, Mike Parker
wrote:
The Feedback Thread is here:
https://forum.dlang.org/post/[email protected]
Why not "int[auto] arr = [1, 2, 3]" ?
IMHO auto keyword is less ambiguous than $.
Someone else could misunderstand `auto` to mean partial type
deduction on associative array, e.g. `int[auto] arr = ["Hello":
ubyte(1), "World": ubyte(2)];`.
Personally, I think `$` is very natural here, but I also didn't
consider `auto` before.
$ is very much appropriate imho, as it implies the length of the
array. auto suggests a type (or storage class) and has only
barely a link with arrays.