On Thursday, 4 July 2019 at 11:06:36 UTC, Eugene Wissner wrote:
static immutable arr = [1, 2];You have to spell it out that the data is static.
Yes, I was wondering why the compiler doesn't statically allocate it automatically as an optimization.
Nick Treleaven via Digitalmars-d-learn Fri, 05 Jul 2019 09:31:00 -0700
On Thursday, 4 July 2019 at 11:06:36 UTC, Eugene Wissner wrote:
static immutable arr = [1, 2];You have to spell it out that the data is static.
Yes, I was wondering why the compiler doesn't statically allocate it automatically as an optimization.