Boost logo

Boost :

From: Aleksey Gurtovoy (agurtovoy_at_[hidden])
Date: 2005-04-28 08:09:13


David Abrahams writes:
> "Thorsten Ottosen" <nesotto_at_[hidden]> 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

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk