On Mon, 26 Sep 2011 13:01:29 +0100, Steven Schveighoffer
<schvei...@yahoo.com> wrote:
On Sat, 24 Sep 2011 00:11:52 -0400, Jonathan M Davis
6. If the S being constructed is shared or immutable and __varProp is
not
called in the constructor, then __varProp is called immediately after
the
constructor (or at the end of the constructor if that works better for
the
compiler).
Why? What if the calculation is very expensive, and you never access
var?
Besides, we can already pro-actively initialize data in an immutable
constructor, what is the benefit here?
I think this is to avoid threading issues, like double checked locking
problems etc.
--
Using Opera's revolutionary email client: http://www.opera.com/mail/