C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Add more methods to std::initializer_list instead of overloading

From: Jason McKesson <jmckesson_at_[hidden]>
Date: Sun, 4 Sep 2022 09:55:10 -0400
On Sun, Sep 4, 2022 at 9:37 AM blacktea hamburger via Std-Proposals
<std-proposals_at_[hidden]> wrote:
>
> Is it a bad idea? After all, containers' methods are not deprecated, why is there no need to consider them?

What's the point? The interface you *ought* to be using is
`ranges::rbegin`. It will work with a much wider variety of types.

If you have an interface that is better in every regard compared to
the original, why would you continue using the original? And
therefore, why should we continue to propagate it? Especially when it
adds more dependencies to a piece of code than is necessary.

Received on 2022-09-04 13:55:45