1. 26

  2. 6

    The most important line in this article:

    Yes, building from source is something that is hard to achieve.

    This is what we must address in all the programming languages we care about. The challenges to overcome simply to build a program are ridiculous. Imagine a society that subsists on bread, but it takes two bakers a week of hard work to bake a single loaf of bread. That’s what it feels like to build C++ code.

    If building was easy, the ABI change would be a no-brainer. So the ABI change issue is actually just a symptom of a disease that runs much deeper. C++ modules are at least 20 years overdue and today, there are many languages that address build complexity quite well. I love C++ but I get frustrated just when I consider pulling in a new library, and I’m sure I’m not the only one. This is poison for the ecosystem because it actively discourages code reuse and fragments the environment. But this thinking is deeply ingrained into C++ culture.

    Aside from that, the STL has many shortcomings that make it unattractive. An encoding-ignorant string-type, unwieldy date and time types, locales, non-uniform and unintuitive interfaces that grew organically, lack of standardized errors (in particular, sum types for error return values), namespace troubles (is it in std:: or not), etc. I’d happily take a 5-10% hit for a saner API, but if the API is insane plus there’s bad performance, there’s really no reason to start a new project in C++ unless it’s the only thing beside C that your platform supports. We can only hope that modules improve the situation and then ABI changes become more realistic.

    1. 5

      Just break the freakin ABI compatibilty. The source can be recompiled, and if not… then just use old version of the language and let other devs enjoy their jobs.

      1. 4

        ” No you shouldn’t link against apt-installed c++ system libraries (which are intended for the system)”

        Very Linux-centric! On Apple platforms any binary using C++ links against libc++.dylib. (I hear the same is true on Windows.) And I’m grateful for that. The C++ std library is already terrible for code bloat, with templates expanding right and left, and this way at least some of it is factored out of your app.

        That said, dylib versioning is a thing on every OS I know of, so it shouldn’t be rocket science to make the linker emit a load command for the version of the library that matches what the compiler expects. Or to get a link-time error if you try to link object files built for incompatible ABIs.

        1. 2

          I hear the same is true on Windows.

          Hasn’t Microsoft telling people for years that if they need C++ stuff, they need to install the redistributable, because devs cannot rely on what’s installed on users’ systems when shipping their software?