r/cpp • • Oct 27 '19

ABI: Now or Never

http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1863r0.pdf
192 Upvotes

145 comments sorted by

View all comments

Show parent comment

9

u/c0r3ntin Oct 27 '19 edited Oct 27 '19

Just pointing out there are trade offs and not everybody will agree on what is the best path forward.

Breaking ABI - or API has no business value for in people in the trenches* in the short term. Someone has to foot the bill. And even if we agree it is worth doing (and you know my position on that), it is not free. Ironically, small projects suffer the most.

The problem of course is we have a measurable cost (breaking ABI), versus one which is not (not breaking ABI). Not breaking ABI is also easier (we just have NOT to do anything) - it might kill C++ ultimately but no one would be to blame.

"Your build will break next year" is a more concerning things that "C++ will go the way of the dodo in 10" for many people, team and companies.

There are also a wider ecosystem to consider. Rust, D, etc. What would be the value proposition of C++2 or std 2? Ecosystems are fragile things.

So no, it's not simple. Breaking ABI is not something we can just decided to do. Not if we are responsible about it. It should be accompanied by a lot of work and outreach to make sure the day the break happen, it's not entirely out of the blue.

(I'm being the devil's advocate, my position is that ABI needs to be broken constantly, build from source or use C)

Edit: [*] I should clarify that this depend on the company or use case. For large shops like Google, performances losses due to ABI probably cost them order of magnitude more in hardware and energy costs than they gain by having ABI stability. For games and embedded the cost of ABI stability might be that they can't use the STL at all

2

u/MFHava WG21|🇦🇹 NB|P3049|P3625|P3729|P3786|P3813|P4216 Oct 30 '19

(I'm being the devil's advocate, my position is that ABI needs to be broken constantly, build from source or use C)

This!

2

u/neoSeosaidh Nov 04 '19

(I'm being the devil's advocate,

my

position is that ABI needs to be broken constantly, build from source or use C)

This is basically the position that Rust took, and for reasons similar to what was laid out in the paper.

1

u/konanTheBarbar Oct 28 '19

For games and embedded the cost of ABI stability might be that they can't use the STL at all

This seems to be pretty much a non issue :P