C++ Logo

std-proposals

Advanced search

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

From: Ville Voutilainen <ville.voutilainen_at_[hidden]>
Date: Mon, 12 Sep 2022 17:04:17 +0300
On Mon, 12 Sept 2022 at 15:49, blacktea hamburger via Std-Proposals
<std-proposals_at_[hidden]> wrote:
>
> I think adding new features requires trade-offs. Users need to become more careful, but that's not too hard. More importantly, it brings many benefits.

It's splendidly hard, when a facility that has, since the dawn of
time, formed a closed overload set now becomes a facility
that forms an open overload set. API designers could no longer protect
their users from the downsides, whereas now they
can, and they can be confident that the protection stays in place over
time, over refactorings elsewhere.

The benefits are not worth losing such a large-scale semantic
guarantee API-design-wise. "Users need to become more careful"
is directly at odds with "the language provides facilities that help
writing large-scale programs".

Received on 2022-09-12 14:04:30