Boost logo

Boost Users :

From: Asif Lodhi (asif.lodhi_at_[hidden])
Date: 2019-11-04 16:14:18


Dear Sir,

On Sat, 26 Oct 2019 at 21:42, Zach Laine via Boost-users <
boost-users_at_[hidden]> wrote:

> On Sat, Oct 26, 2019, 12:41 AM Rainer Deyke via Boost-users <
> boost-users_at_[hidden]> wrote:
>
>> On 26.10.19 03:11, Zach Laine via Boost-users wrote:If convenience is so
>> paramount, why don't we add member sort () to vector? This is not a troll,
>> I would really like to know. I want to find something in a vector or sort
>> a vector about as often as I want to find a character or subsequence within
>> a string. What, to you, is the difference? If there isn't one, please
>> explain that too.
>
>
I am not an expert (at all) on Unicode but I'd certainly like to add my 2
bits in response to your argument as to why sort() is not a vector member.
IIRC, Bjarne Stroustrup (and, I guess, most C++ language designers/standard
committee members?) has a clear preference of restricting the member
functions of a class to only those functions that are absolutely required
to maintain the class invariant. I think I read it in TC++PL's 3rd edition.

-Asif Lodhi



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net