C++ Logo

std-proposals

Advanced search

Re: [std-proposals] ABI

From: Hans <hguijtra_at_[hidden]>
Date: Mon, 22 Jul 2024 23:22:40 +0200
On 21/07/2024 19:02, Bjorn Reese via Std-Proposals wrote:
> On 7/21/24 17:51, Hans via Std-Proposals wrote:
>
>> I want to be able to mark some datastructures as guaranteed-stable,
>> and for the rest of the datastructures to have no stability guarantee.
>
> Have you considered a more radical approach, where these ABI classes
> only holds data? They may have constructors, destructors, and simple
> accessors, but nothing else. These ABI classes are wrapped by API
> classes that holds the functionality. The ABI classes must be easy
> to move to API classes. Alternatively, or complementarily, the
> functionality may reside in standalone functions.

I'm not sure how that changes anything?

Of course, if this becomes a reality, other languages would need
accessor functions they can call, and for a language like C that would
involve this type of approach. But for C++ it isn't necessarily an
improvement.

> This allows the addition and removal of functionality without affecting
> the ABI.

You can do that anyway. Adding or removing non-virtual member functions
doesn't change the ABI.


Hans Guijt

Received on 2024-07-22 21:22:40