Reference counted containers prototype

Peter Alexander peter.alexander.au at gmail.com
Tue Dec 27 06:44:29 PST 2011


On 27/12/11 12:15 PM, Froglegs wrote:
> What is wrong with value containers? They work great in C++, a container
> is such a basic thing that ref counting and whatnot is rarely if ever
> needed, and in the unlikely event you need to share a container,
> wrapping it with a smart pointer of some sort is easy enough in C++, let
> alone D with its better support for type aliasing.

There's not much point in having value containers if you just pass them 
around by reference all the time (as you do in C++). If you treat them 
like reference types then they should be reference types.


More information about the Digitalmars-d mailing list