"Jonathan M Davis" <jmdavisp...@gmx.com> wrote in message news:mailman.1005.1292374292.21107.digitalmar...@puremagic.com...
On Tuesday, December 14, 2010 16:35:34 Craig Black wrote:
> What say you?

I feel like the odd man out here since my perspective is so different.  I
use custom container classes even in C++, partly because I can usually get better performance that way, and because I can customize the the container
however I like.  So I will probably be doing my own containers if/when I
use D.

Beyond that, my own personal preferences seem so different that I hesitate to mention them. I use dynamic arrays by far the most out of all container
classes.  I use them so much that I cringe at the thought of allocating
them on the GC heap. My code is very high performance and I would like to
keep it that way.

Also, my usage of arrays is such that most of them are empty, so it is
important to me that the empty arrays are stored efficiently.  Using my
custom container class, an empty array does not require a heap allocation,
and only requires a single pointer to be allocated.

Not sure if these requirements are important to anyone else, but I don't
mind making my own custom containers if I need to.

Dynamic arrays are already on the GC heap...

- Jonathan M Davis

Using built-in D arrays, yes. Using a templated struct, they don't have to be. C++ std::vector works just fine without GC. The same can be done in D.

Reply via email to