Discussion Thread: DIP 1039--Static Arrays with Inferred Length--Community Review Round 1

Mathias LANG geod24 at gmail.com
Wed Jan 6 14:03:14 UTC 2021


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/qglydztoqxhhcurvbxhs@forum.dlang.org
>
> 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.


More information about the Digitalmars-d-announce mailing list