Containers
bitwise via Digitalmars-d
digitalmars-d at puremagic.com
Sat Sep 5 11:22:01 PDT 2015
On Saturday, 5 September 2015 at 06:44:30 UTC, Dmitry Olshansky
wrote:
> On 05-Sep-2015 05:36, bitwise wrote:
>> On Friday, 4 September 2015 at 23:15:54 UTC, Andrei
>> Alexandrescu wrote:
>>> [...]
>> I feel should add that I still very much favor simple value
>> type
>> containers.
>>
>> C++ does just fine with value-type containers. I know "D isn't
>> C++" but
>> if it works, it works.
>> [...]
>
> I agree if only on the grounds of composability. Value-typed
> containers are "more" then ref-based ones. As we can always get:
>
> Unqiue!ValueTypedContainer or RC!ValueTypedContainer
>
> on top of value type container.
>
or even a class! =)
static import collections;
final class List(T) {
private collections.List!T _list;
alias _list this;
this(Args...)(Args args) {
_list = collections.List!T(args);
}
}
More information about the Digitalmars-d
mailing list