Kinds of containers

Ice Cream Man via Digitalmars-d digitalmars-d at puremagic.com
Wed Oct 21 12:11:09 PDT 2015


On Wednesday, 21 October 2015 at 19:07:50 UTC, Jonathan M Davis 
wrote:
> On Wednesday, 21 October 2015 at 18:48:18 UTC, Brad Anderson 
> wrote:
>> All that said, I agree with you that the implicit copying 
>> isn't really all that desirable. Perhaps there is a better 
>> way. What if instead of value semantics we had unique 
>> containers (akin to std.typecons.Unique or unique_ptr in C++) 
>> and required people to always state whether it was a copy or 
>> move? That takes care of the error prone implicit copying 
>> while retaining the performance characteristics.
>
> Well, we could always have a wrapper for reference type 
> containers that turns them into a value type,

ugh...that sounds horrible.


More information about the Digitalmars-d mailing list