C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Stop adding more member functions that shouldn't be added

From: Ivan Matek <libbooze_at_[hidden]>
Date: Tue, 18 Oct 2022 23:56:23 +0200
On Sun, Oct 16, 2022 at 10:33 AM blacktea hamburger via Std-Proposals <
std-proposals_at_[hidden]> wrote:

> http://www.gotw.ca/gotw/084.htm expounds that where possible, prefer
> writing functions as nonmember nonfriends. So many mistakes have been made
> in the standard library, but they are hard to correct. So now we can only
> stop making more mistakes like std::basic_string::contains, which I
> recommend removing.
>

Beside deque one I guess this is probably the worst gotw ever written
although it has been years since I read them so maybe I am forgetting
something.
Member funtions are easier to read and teach, easier for IDEs...

Received on 2022-10-18 21:56:34