April 29, 2017 What's the rationale behind partial initialization of static arrays ? | ||||
---|---|---|---|---|
| ||||
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) |
Copyright © 1999-2021 by the D Language Foundation