immutable ctors, immutable members, and TDPL

Kenji Hara k.hara.pg at gmail.com
Thu May 23 18:28:32 PDT 2013


2013/5/24 Ali Çehreli <acehreli at yahoo.com>

> On 05/23/2013 08:41 AM, Steven Schveighoffer wrote:
>
> > The immutability should be applied on the first read of the
> > member,
>
> Makes sense to me.
>
> Not exactly the same issue but here is a related past discussion:
>
>   http://forum.dlang.org/thread/**khu6tl$q8o$1@digitalmars.com<http://forum.dlang.org/thread/khu6tl$q8o$1@digitalmars.com>
>
> Quoting deadalnix:
>
> "Yes, in general, first assignment in a constructor should be
> considered as a declaration if the value is not read before.
>
> This allow for the mentioned optimization, but many very other
> important stuff as well, like the construction of immutable
> objects."
>
> And the enhancement request:
>
>   http://d.puremagic.com/issues/**show_bug.cgi?id=9732<http://d.puremagic.com/issues/show_bug.cgi?id=9732>


Enh 9732 is a dup of bug 9665?
http://d.puremagic.com/issues/show_bug.cgi?id=9665

Kenji Hara
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20130524/6e9ac7d9/attachment.html>


More information about the Digitalmars-d mailing list