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

jmh530 john.michael.hall at gmail.com
Tue Jan 12 18:19:14 UTC 2021


On Tuesday, 12 January 2021 at 17:27:50 UTC, Q. Schroll wrote:
> On Monday, 11 January 2021 at 21:17:20 UTC, jmh530 wrote:
>> On Monday, 11 January 2021 at 14:42:57 UTC, Nick Treleaven 
>> wrote:
>>> [snip]
>>>
>>> Just a suffix like `[1,2]$` or `[1]s`. Then just use `auto 
>>> var =` with it as normal.
>>
>> Gotcha. I think I would use that more than the current DIP 
>> (though I prefer [1]s to [1]$).
>
> You can do it today if you don't mind putting the marker in 
> front: https://run.dlang.io/is/E6ne4k (Its operator abuse. What 
> would you expect?)

Interesting approach! However, it doesn't really resolve my 
underlying issue, which was that I would still need to import 
that s struct.


More information about the Digitalmars-d-announce mailing list