Andrei Alexandrescu via Digitalmars-d
digitalmars-d at puremagic.com
Sat Nov 14 07:41:12 PST 2015
On 11/13/2015 06:26 PM, Ali Çehreli wrote:
> On 11/13/2015 03:10 PM, Andrei Alexandrescu wrote:
> > at http://dpaste.dzfl.pl/0981640c2835
> > * Lines 11-12: I came to terms with the notion that some types cannot be
> > made immutable.
> Could constructor qualifiers help in such cases? I would like to hear
> war stories and experiences from others who used that feature before:
> The spec:
> My rewording:
Great writeup. Constructor qualifiers are part of the larger discussion
about collections, but in this case it's a deeper matter.
The code uses non-atomic ++ and -- for the refcount exactly because an
immutable List cannot be constructed, so it's not shared among threads.
More information about the Digitalmars-d