On Friday, 14 June 2019 at 11:10:58 UTC, rumbu wrote:
On Friday, 14 June 2019 at 07:52:24 UTC, Marco de Wild wrote:
On Thursday, 13 June 2019 at 16:08:52 UTC, Mike wrote:
Opposed to Java, D's member variables are static initialised.

Is there any documentation about this? I find it unexpected.

https://dlang.org/spec/class.html#static-constructor

«All member initializations must be determinable by the compiler at compile time, hence there is no order-of-evaluation dependency for member initializations, and it is not possible to read a value that has not been initialized. Dynamic initialization is performed by a static constructor»

Reply via email to