improvement request - enabling by-value-containers

Jonathan Schmidt-Dominé devel at the-user.org
Tue Dec 14 18:06:00 PST 2010


> copy_if on a multidimensional container should not naively copy entire
> hyperplanes. More generally, I think that whenever an arbitrarily large
> object is to be copied, that should be explicit instead of implicit. A
> lot of focus in C++ is dedicated to making sure you don't copy the wrong
> thing.

In my opinion by-value-types are good for mathematical objects and data like 
numbers, tuples, sets, lists, vectors, dictionaries etc., by-reference-types 
are good for things like graphical objects/widgets, hardware-ressources, io-
handles, factories etc.
Unnecessary copies? The compiler should care about that, I want to have 
clear semantics and generic syntax.


More information about the Digitalmars-d mailing list