On Friday, 30 March 2018 at 11:14:32 UTC, ketmar wrote:
please, make an ER in bugzilla then. 'cause it will be lost
here, and with ER we have a chance to eventually do that.
Will do.
Laurent Tréguier wrote:
On Friday, 30 March 2018 at 11:04:59 UTC, ketmar wrote:
p.s.: still, it may be nice to warn user about that. 'cause such runtime
initializations are really belong to static ctor. dunno, i'm ok both
with warning and without it.
I simply think a word about it in the doc
On Friday, 30 March 2018 at 11:04:59 UTC, ketmar wrote:
p.s.: still, it may be nice to warn user about that. 'cause
such runtime initializations are really belong to static ctor.
dunno, i'm ok both with warning and without it.
I simply think a word about it in the docs would be nice, since
th
p.s.: still, it may be nice to warn user about that. 'cause such runtime
initializations are really belong to static ctor. dunno, i'm ok both with
warning and without it.
Laurent Tréguier wrote:
Is this behavior really intentional ?
yes. default values should be the same for all objects. it is predictable,
and allows to initialize objects to the known state simply by blitting
`.init`.
that is, default values aren't a syntax sugar for defining implicit ctor
a
Coming from a more Java-esque background, I'm used to sometimes
initializing class members outside of the constructor :
class MyClass {
Object member = new Object();
}
I've tried using this in D, but I've come to realize it acts very
differently. In Java, the `new Object()` will be execute