On Wednesday, 1 June 2016 at 14:52:29 UTC, John Nixon wrote:
Clearly from your comments, we have lost the argument as far as
D is concerned. This leads me to question whether a computer
language that is similar to D except that all variables of any
type are considered in the same way as objects that own their
own data has been considered? I would like to suggest the
following:
1. Assignment would imply full (deep) copies
2. “dup” functions would not need to exist
3. I think the const system could be much simpler, perhaps more
like it is in C++
4. Function parameters would be passed by reference by default
(to avoid unnecessary copying, but with a reliable const system)
Value-type containers are planned for phobos, but not done yet.
You can try
https://github.com/economicmodeling/containers/blob/master/src/containers/dynamicarray.d - it's not copyable currently.