What's the rationale behind partial initialization of static arrays ?
Basile B. via Digitalmars-d
digitalmars-d at puremagic.com
Sat Apr 29 06:43:47 PDT 2017
I'd like to know why the things work like they are working now:
===
module a;
immutable int[42] a = [42]; // OK
static immutable int[42] b = [42]; // OK
void main()
{
immutable int[42] c = [42]; // Not allowed
}
===
1/ this is error prone
2/ the semantic is not consistent (allowed here, forbidden there)
More information about the Digitalmars-d
mailing list