Transience of .front in input vs. forward ranges

Tommi tommitissari at hotmail.com
Mon Nov 12 00:37:19 PST 2012


Now I finally see that deepDup/deepCopy/clone is not a (good) 
solution, because it would be inefficient in a lot of situations. 
This whole mess makes me wish that D was designed so that all 
types had value semantics (by convention, since it's probably not 
possible to enforce by the language).

That would mean:
1) No classes. Just duck-typing based polymorphism à la go 
language.
2) Dynamic arrays of mutable types would have had to been 
implemented as copy-on-write types à la Qt containers.

Don't know about the performance implications of COW though.


More information about the Digitalmars-d mailing list