
Thorsten Ottosen <nesotto <at> cs.auc.dk> writes:
"David Abrahams" <dave <at> boost-consulting.com> wrote in message news:uacnkw0cr.fsf <at> boost-consulting.com... | "Thorsten Ottosen" <nesotto <at> cs.auc.dk> writes: | > Pick up you're favourite book on OO and on STL and see if the | > programming techniques look alike. | | That's a very parsimonious explanation. It would be nice if you'd try | to make it a bit clearer in the context of the question of duplicating | objects, and show how it justifies a choice to prohibit ptr_containers | from acting like proper values.
the first reason must be its damn expensive without move-semantics.
So is std::vector<std::map<std::vector<std::string>, std::set<int> > >, std::vector<int> >. Should the standard library prevent users from using copy construct/copy assignment syntax with this data structure?
the second reason is that value-based and OO programming are different and are best kept seperate; there are different idioms, different parts of the langauge is being used.
How do you know ptr_containers will be used in OO contexts? Why can't a user use such containers to simply keep track of values? One of the great strengths of C++ is that it doesn't try to force the programmer into any one programming paradigm. Your justification for denying ordinary copy syntax is against this spirit. Bob