Old problem with performance
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Fri Feb 13 06:24:54 PST 2009
Rainer Deyke wrote:
> Andrei Alexandrescu wrote:
>> C++ ctors won't do the right thing if you use pointers, which is the
>> moral equivalent of using T[] inside MathematicalVector. If you refer to
>> std::vector instead, then that's a carefully-defined type that does have
>> the right copy constructor defined.
>
> So where's the D equivalent of std::vector? Phobos has nothing.
It will.
> I was under the impression that native arrays were intended to be used
> directly in D, something I rarely do in C++. Certainly neither of the
> standard libraries has any hesitation about passing unadorned dynamic
> arrays around.
Phobos2 plans to consistently consider T[] a range, not a full-fledged
array. A range corresponds to a pair of iterators in STL.
Andrei
More information about the Digitalmars-d
mailing list