• [generated]How Rust killed C++

    From ram@ram@zedat.fu-berlin.de (Stefan Ram) to comp.lang.c++ on Mon Apr 6 16:59:46 2026
    From Newsgroup: comp.lang.c++

    Generated by a chatbot according to my (Stefan's) instructions:

    How Rust Killed C++

    I never thought I'd write these words. As someone who's crafted
    templates, fought linker errors, and reverently quoted Bjarne
    Stroustrup for two decades, I wanted to believe C++ could
    endure anything. But the past few years have made something
    painfully clear: Rust's momentum isn't hype - it's structural.

    The shock came when Google began phasing out C++ in parts of
    Android's system code and Facebook engineers started rewriting
    critical infrastructure components in Rust. It wasn't just for
    novelty; it was because Rust gets right what C++ never quite managed
    to fix, even after C++11, C++17, and our beloved C++20 revolution.

    At the heart is memory safety. Rust's ownership model turns
    what we've long treated as cultural discipline - avoiding
    use-after-free bugs, managing lifetimes manually, and keeping
    track of unique_ptr vs shared_ptr - into language guarantees
    enforced at compile time. The borrow checker may frustrate,
    but it eradicates entire bug classes before they exist. In C++,
    it's still one missed std::move away from undefined behavior.

    The other silent killer: tooling and concurrency. Cargo made
    dependency management and reproducible builds trivial. Meanwhile,
    every C++ shop maintains its own fragile CMake labyrinth, hoping
    nothing breaks across compiler versions. Rust's async/await model
    feels like C++20 coroutines finally done right - no bleeding
    edge compilers, no template metaprogramming wizardry just to
    make tasks run concurrently without data races.

    In Google-scale systems, where "secure and maintainable" beats
    "fast and hand-tuned," Rust's consistency wins. Even when
    performance parity exists, Rust's ecosystem offers confidence that
    C++ now struggles to give. Facebook's server teams, once proud of
    custom allocator libraries and runtime introspection, now push for
    Rust because the language makes correctness the default.

    And the irony? It's not that C++ is slower. It's that writing safe
    C++ at scale requires more human ceremony than compiler enforcement.

    So, where does this leave us C++ veterans? None of us want to
    see the craft die - we admire its raw power and expressiveness.
    But the time has come for Bjarne to shift the narrative:
    C++ must prioritize safety and simplicity over backward
    compatibility. Drop the fear of breaking old code; embrace a
    "modern core C++" that has ownership semantics built into its
    DNA, maybe even interoperable with Rust. If not, the next
    generation won't learn C++ - they'll just port our code to Rust.


    --- Synchronet 3.21f-Linux NewsLink 1.2