
David Abrahams writes:
"Thorsten Ottosen" <nesotto@cs.auc.dk> writes:
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.
That's a very paternalistic approach to library design, and rather unprecedented. Normally the only reason to make functionality that you're implementing anyway hard to access is that it introduces potential correctness problems, e.g. undefined behavior. Efficiency considerations are usually only used when deciding whether or not to provide functionality at all. for example, that's why we don't have std::vector::push_front.
To be fair, usually the "disabled" functionality is still available through other means, e.g. you can still do v.insert( v.begin(), ... ) // == v.push_front( ... ) and std::advance( bi, n ) // == bi + n So, in some sense, there is a number precedents supporting Thorsten's position. Not that it makes his particular design decision valid. -- Aleksey Gurtovoy MetaCommunications Engineering