On 25/06/2024 3:38 PM, mw wrote:
Why D choose to be different here? i.e. |shared_AA_class saa = new shared_AA_class()| only evaluate only once, and even force it must be evaluate-able at compile time?

That has nothing to do with it.

Every type in D has an initialized value, that everything starts off as, byte for byte.

When you have a field with an initializer it gets put into that initialized value.

The constructor does not perform the initializer.

Reply via email to