Collections question
Tobias Pankrath via Digitalmars-d
digitalmars-d at puremagic.com
Sat Nov 28 01:01:29 PST 2015
On Friday, 27 November 2015 at 20:14:21 UTC, Andrei Alexandrescu
wrote:
> There's this oddity of built-in hash tables: a reference to a
> non-empty hash table can be copied and then both references
> refer to the same hash table object. However, if the hash table
> is null, copying the reference won't track the same object
> later on.
>
> Fast-forward to general collections. [...]
>
> Andrei
I'd prefer the factory method and we shouldn't allow lazy
initialization. That's only confusing, if it sometimes works and
sometimes won't work. Null container should throw.
More information about the Digitalmars-d
mailing list