Paralysis of analysis

Jonathan Schmidt-Dominé devel at the-user.org
Tue Dec 14 13:58:29 PST 2010


> I continue to belief, that containers should be value-types. In order
> to prevent useless copying you can use something like "Impl * impl"
> and reference-counting. Then you only do a copy on actual change. This
> is the way I'm currently implementing in my own container-classes.
>From my point of view reference counting is not very elegant. The compiler 
should take care (or give possibilities to take care!!) that no unneccessary 
copies are made. It could be much simplier than reference counting, but D is 
simply currently not powerfull enough to allow this in a generic way. As I 
said in another thread some minutes before: I agree that containers should 
definitely be by value.

The User


More information about the Digitalmars-d mailing list