Discussion Thread: DIP 1039--Static Arrays with Inferred Length--Community Review Round 1
Paul Backus
snarwin at gmail.com
Mon Jan 11 21:33:36 UTC 2021
On Monday, 11 January 2021 at 21:17:20 UTC, jmh530 wrote:
> Of course, the typical response would be, "well why not use
> alias s = static array". I would ask what about an @nogc
> unittest where the author is trying to limit calls to functions
> that aren't really central to what is being tested.
I've used std.array.staticArray for @nogc unit tests. It works
fine, and the fact that it has a descriptive name makes it a lot
more readable than something like `[1, 2, 3]s`.
More information about the Digitalmars-d-announce
mailing list