C++ Logo

std-proposals

Advanced search

Re: [std-proposals] ABI

From: Thiago Macieira <thiago_at_[hidden]>
Date: Thu, 11 Jul 2024 13:16:27 -0700
On Thursday 11 July 2024 10:31:02 GMT-7 Hans via Std-Proposals wrote:
> If the proposal is accepted, classes that are newly added to the
> standard will be open for on-going optimisation and evolution. Existing
> classes will not be because of backward compatibility reasons, but those
> can be replaced by newer versions (std::regex2, std2::regex, something
> like that), and the new versions will be newly added and therefore open
> to improvement.

You need to talk about the transition phase, when 99.9999% of the C++ programs
are still using the non-stable API/ABI. Given that, the number of codebases
that could benefit from the newly-declared-stable API/ABI is virtually
indistinguishable from zero. So why would anyone use the new content? And who
would they use it with?

I also think you're trying to solve a non-problem. First, who is your
audience? Who benefits from this? Who are they interacting with that needs this
to be solved?

Second, why isn't the current status quo sufficient? The libstdc++ ABI has been
kept stable for 20 years now. By that I mean it was intended to be kept
stable: all breakages that have happened (and they have) were unintentional,
including that of std::__cxx11::basic_string. If they were the result of
mistakes, there's nothing preventing mistakes from happening using the newly-
marked classes too, so why would your proposal make a more stable ABI than
what libstdc++ has delivered for two decades?

Third, what is the cost of this? As in both performance cost for the code in
question, the cost of porting code over to it, and the cost of writing new
classes using this method, which itself is more costly to the developers?

Fourth, assuming there is a need that isn't solved, is your audience best
served with a different type of solution? It almost sounds like the data
exchange should happen on a network-like serialisation protocol.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Principal Engineer - Intel DCAI Platform & System Engineering

Received on 2024-07-11 20:16:29