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

Basile B. b2.temp at gmx.com
Wed Jan 6 10:58:23 UTC 2021


On Wednesday, 6 January 2021 at 10:55:39 UTC, Ola Fosheim Grøstad 
wrote:
> I am in favour of more controlled type inference in general, 
> but perhaps this one is a bit specific. What if you defined "_" 
> to mean "deduce whatever should be in this spot", not only for 
> static arrays, but for all types?
>
>
> Then you could do:
>
> int[_] = …
>
> or
>
> _[_] …
>
>
> etc

'$' is not an ident char, that's why that works


More information about the Digitalmars-d-announce mailing list