improvement request - enabling by-value-containers

spir denis.spir at gmail.com
Wed Dec 15 04:02:16 PST 2010


On Wed, 15 Dec 2010 03:06 +0100
Jonathan Schmidt-Dominé <devel at the-user.org> wrote:

> > 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.

+++

The choice of value/ref should always be based on (human) semantics _only_. Any other design (of language or app) is wrong.


Denis
-- -- -- -- -- -- --
vit esse estrany ☣

spir.wikidot.com



More information about the Digitalmars-d mailing list