C

cor3ntin

cor3ntin.github.io · Personal blog · on HN since 2018

Corentin Jabot, a C++ standards committee participant, writes about the standard library, ABI stability, safety, and language proposals.

What HN saysCommenters cite his ABI post as a classic, noting that slow std::regex and other standard library problems stay frozen because of ABI stability.
32HN people shared it
14linked it in comments
34stories submitted
550story points
7 months agolast shared
2018people per year2026

Most-shared posts

  1. 1
    The Day The Standard Library Died (2020)
    15 people · 81 points · first shared 2020 · 12 comments on HN
  2. 2
    The Problem with C (2020)
    5 people · 196 points · first shared 2020 · 173 comments on HN
  3. 3
    A Universal I/O Abstraction for C++ (2020)
    3 people · 119 points · first shared 2020 · 86 comments on HN
  4. 4
    Legacy Safety: The Wrocław C++ Meeting
    3 people · 15 points · first shared 2024 · discussion on HN
  5. 5
    Translation Units Considered Harmful?
    2 people · 112 points · first shared 2018 · 61 comments on HN
  6. 6
    Waiting for std:embed: Large Arrays in Clang
    2 people · 4 points · first shared 2020 · discussion on HN
  7. 7
    If we must, let's talk about safety (2022)
    2 people · 4 points · first shared 2022 · discussion on HN
  8. 8
    Standard library development made easy with C++20
    2 people · 3 points · first shared 2020 · discussion on HN
  9. 9
    C++ Modules are not a tooling opportunity
    2 people · 2 points · first shared 2018 · discussion on HN
  10. 10
    What is C++?
    1 people · 3 points · first shared 2019 · discussion on HN
  11. 11
    What is the C++ standard library?
    1 people · 3 points · first shared 2020 · discussion on HN
  12. 12
    A Patchwork of Clang Patches
    1 people · 3 points · first shared 2025 · discussion on HN
  13. 13
    Characters sets: A bad idea since the bronze age
    1 people · 2 points · first shared 2019 · discussion on HN
  14. 14
    To humbly present a wish-list for C++23
    1 people · 1 points · first shared 2020 · discussion on HN
  15. 15
    Soursop and Ponies in Kona: A C++ Committee Trip Report
    1 people · 1 points · first shared 2022 · discussion on HN

What HN people wrote when they linked it

drno123 · 2021-08-04
This is now a classic reading: (tldr: it is faster to call PHP process from C++ code and do regex in PHP than to use std::regex, and slow std::regex will never change because the Comittee doesn’t want to break ABI in favor of speed): https://cor3ntin.github.io/posts/abi/
fl0ki · 2024-04-07
My problem is that if you're an actual C superset, you're carrying a lot of baggage that will permanently compromise the best case of what you can ever become. These days, with C standards back on a regular cadence, the thing you have to be a superset of is also a moving target, and you have to make sure your extensions don't end up incompatible with future C changes. If you succeed enough, the C standard has to be worried about compatibility with you in return. Even the most conservative C supersets like non-standard GNU C have created friction for what the actual ISO standard can do in future, including the highly demanded addition of nested functions [1]. One could almost argue that the long-term value of that C superset will be net-negative precisely because it was successful enough to become a permanent interoperability hazard for C itself. (They could have avoided that by not claiming to be C at build time, but that would have also avoided anyone ever using it, just like almost all of the other supersets). C++ isn't even a C superset and still that relationship creates friction both ways [2]. Now if you're not a C superset, you have a more difficult adoption story and that is enough to kill a language before it ever has a chance. Even so, far more languages have succeeded by tackling interoperability problems than by being supersets. Rust has a fair amount of friction binding to C, but people see enough value in overcoming that; and part of what people claim to…
Ygg2 · 2026-02-15
Yeah but ABI stability isn't really just magic dust you sprinkle in you language/compiler and make it more stable It's a straightjacket that has application in few select cases. Things ABI prevents in C++: - better shared_ptr - adding UTF8 to regex - int128_t standardisation - make most of <cstring> constexpr And so on: https://cor3ntin.github.io/posts/abi/ I get you might have particular criteria on this. But it's a feature that comes with huge, massive downsides.
JonChesterfield · 2025-08-01
A good write up of that is at https://cor3ntin.github.io/posts/abi/
einpoklum · 2025-04-24
> "how to make STL implementation less embarassing". The "STL" part of the standard library - containers especially but not just that - has an outdated interface, and suffers from ABI being stuck: https://cor3ntin.github.io/posts/abi/ so it's embarrassing regardless. > there still is no language support for e.g. debugging constexpr, or printing internal private state of objects in 3rd party code. Actually, reflection might make it easier to do that. Supposedly, you should be able to get a member pointer to the private member you're interested in (or even do it dynamically by iterating over all members, and figuring out which one you like), from that and an actual object obtain a regular pointer, and finally dereference it.
sophacles · 2024-03-20
The standard doesn't say it, but from context clues I presume GP meant "the c++ standard [committee] cares..."[1] And they do care deeply - here's a post from a C++ committee member discussing the issue: https://cor3ntin.github.io/posts/abi/ [1] Evidenced by the rest of the post talking about the committee, and referring to people a couple messages up thread: > And yet they can't update the standard library types to not be slow as hell because of ABI concerns. etc.
dralley · 2023-11-27
I'm skeptical of the value of adding on "safe / unsafe" to C++ at this point. It's a bit like adding type annotations to Python. Better than nothing I suppose, but there's 30+ years of C/C++ that doesn't and will never be opted-in to these features, and the value declines rapidly when only 10% of the codebase (including dependencies) can be considered "safe" vs. when 99.9% of it can be. https://cor3ntin.github.io/posts/safety/
skitter · 2023-02-28
As far as I can tell, Priority #1 is backwards compatibility. For example, std::regex can be slower than launching PHP and running the regex there¹, but that won't be fixed because it would require an ABI break. I'm not sure how that happened, as neither the poor performance nor the unwillingness to change ABI were unknown. Performance seems to not have been the top priority in the design of std::unordered_map either, which requires reference stability and therefore boxing. This likewise isn't something unexpected. ¹: https://cor3ntin.github.io/posts/abi/
lenkite · 2022-07-19
A stable ABI can effectively kill a language. https://cor3ntin.github.io/posts/abi/
codys · 2022-05-01
- a WG paper by a google employee regarding breaking the C++ ABI: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p1863r1.pdf - A post about a C++ ABI break being voted against: https://cor3ntin.github.io/posts/abi/ I would not be surprised if google (or others in favor of breaking the ABI for the c++ standard library) would refocus on their alternate non-std std-replacement-ish library implementations (like abseil) instead given the lack of willingness to fix things in std proper from the committee.
pornel · 2020-08-03
C++ has a policy of not making changes that would break anyone's ABI, but still doesn't have an official one. https://cor3ntin.github.io/posts/abi/
throwaway8941 · 2019-12-13
I am not an expert in C++, but there exists an opinion that it will not help as much as you might think. https://cor3ntin.github.io/posts/modules/
slavik81 · 2018-11-28
That's a current topic of discussion for C++20 and beyond. https://cor3ntin.github.io/posts/sandiego/#deprecate-comma-operator-in…
comex · 2024-04-29
And yet C, an even lower-level language, achieves the same effect without the duplication of PIMPL. You just forward-declare a struct, and declare functions that accept pointers to it: the header doesn't need to contain the struct fields, and you don't need to define any wrapper functions. Technically you can do the same in C++. But in C++ to make an idiomatic API you need methods instead of free functions, and you can't declare methods on forward-declared classes. Why not? Well, I can imagine some reasons… but they have more to do with C++'s idiosyncrasies than any fundamental limitation of a low-level language. The C++ committee could address this, but instead they seem to want to pretend separate compilation doesn't exist. (Why are there no official headers to forward-declare STL types, except for whatever happens to be in <iosfwd>?) Then they complain about how annoying it is to preserve ABI stability for the standard library, blaming the very concept of a stable ABI [1] [2], all while there are simple language tweaks that could make it infinitely more tractable! But now I'm ranting. [1] https://cor3ntin.github.io/posts/abi/ [2] https://thephd.dev/binary-banshees-digital-demons-abi-c-c++-help-me-go…

Keyboard shortcuts

/Search
j kNext / previous blog
EnterOpen selected blog
vVisit the blog site
fFollow / unfollow
lSwitch grid / list view
dSwitch dark mode
g hHome
g pTop posts
g tTopics
g fFollowing
g lLiked
g yHistory
g qFAQ
EscBack / close