C++ Logo

std-proposals

Advanced search

Re: [std-proposals] PR: std::allocator<T>::allocate is not freestanding

From: Thiago Macieira <thiago_at_[hidden]>
Date: Sun, 03 Sep 2023 17:42:37 -0700
On Sunday, 3 September 2023 16:29:41 PDT unlvsur unlvsur via Std-Proposals
wrote:
> When will we see innovations like "Herbceptions"? When will a genuine
> alternative to iostreams emerge? When can we replace std::locale with
> something else?
>
> Why should we introduce new features before addressing existing issues in
> C++? Introducing new features prematurely will only result in further
> failures, similar to past additions like the GC interface, locale, regex,
> charconv, std::format, and std::filesystem.

Your two paragraphs are antithetical to each other.

On one, you argue that we need replacements. In the other, you argue against
introducing new things.

We can only replace something with something new. We need to add the
replacements into the language long before we can deprecate and much less
remove anything that is already there. There are some warts in the Standard
Library -- std::locale and the facets, for example, where I agree with you --
but we need a trialled substitute that people are using for years before we
can remove those.

Furthermore, there's nothing wrong with adding unrelated things. You can't
force people to work on things they don't want to work on. Yes, I realise that
this means the unflattering parts of the language and the library get little to
no attention, thereby having little chance of ever getting fixed. Trust me, I
know: as maintainer of QtCore, I know this well and actually in similar areas
(QIODevice). This would be a reasonable argument if the new features were
taking the mindshare and time of the people who would be working on fixing
those issues that you claim are problems, but there's no evidence of that.

This is of course assuming those people agree that there is something to be
fixed in those areas in the first place. I doubt we'll get 100% agreement on
that, but I do think we'll get a consensus on a few areas (again, locale and
facets as an example, the innards of iostreams as another).

> And regarding allocators, they shouldn't even be a concern in freestanding
> environments.

And given the responses so far, I don't think there is much a concern on the
*idea*. The devil is only in the details of writing the standard language, so
as to not overpromise and be unable to deliver.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel DCAI Cloud Engineering

Received on 2023-09-04 00:42:40