C++ Logo

std-proposals

Advanced search

Re: [std-proposals] ABI

From: Hans <hguijtra_at_[hidden]>
Date: Thu, 11 Jul 2024 21:40:17 +0200
On 11/07/2024 21:27, Tiago Freire wrote:
>> It solves the problem that classes, once added to the standard library, immediately fossilize, and are no longer eligible for any kind of optimisation or evolution that would change their ABI.
>
> I just recompile my code, why would that be a problem? I change ABI on my personal libraries all the time, never had a problem.

> It's a rhetorical question, that is not your real-world problem. Your problem is something else, I want to get to that.

We could have come to this point without me spending hours answering
your questions, simply by you stating "I do not think this is a problem".

Not everyone has the luxury of being able to 'just recompile their
code'. Some libraries are distributed in binary form only. To support
these people, the committee has adopted a policy of not making any
changes that would affect ABI. This is a real-world problem that affects
library evolution, both in terms of optimisation and in terms of
additional features. Well-known classes that are sub-optimal and cannot
be improved due to ABI concerns include std::regex, std::deque, and
std::unordered_map. And std::jthread could just have been a small
extension to std::thread, except that it would have changed ABI, so a
new class was necessary.

If you disagree this is something that needs to be addressed at all,
just say so, and kindly do try to motivate it with something that goes
further than just your personal needs.


Hans Guijt

Received on 2024-07-11 19:40:20