<story><title>C++23: Removing garbage collection support</title><url>https://www.sandordargo.com/blog/2023/11/01/cpp23-garbage-collection</url></story><parent_chain><item><author>wg0</author><text>I have this impression that modern C++ is far more complex with a far more large surface area (from the perspective of learning the language) than Rust.&lt;p&gt;Because I am not expert in both, what folks that came from C++ to Rust or have to work regularly work with both say about that?</text></item></parent_chain><comment><author>benreesman</author><text>I’ve done a pretty fair amount of both, more C++ in total, more recent work in Rust.&lt;p&gt;I think it really depends on whether you’ve got a mountain of legacy C++ with dated infrastructure and practices or a modern C++ code base at shop that runs a tight ship.&lt;p&gt;In the former case the incidental as opposed to inherent complexity in C++ is a real PITA compared to Rust (which isn’t exactly shy about gratuitous complexity especially in the trait system and going more than a bit overboard with macros IMHO). C++03 written without modern tooling and a hardass style guide and stuff is usually a nightmare. I would vastly prefer to work in almost any Rust codebase compared to a sprawling nightmare of code that still calls new&amp;#x2F;delete routinely.&lt;p&gt;A modern C++ codebase with all the best practices and tools and stuff? 6 one way half dozen the other more or less: Rust is now fast and feature full enough to be an option for most anything C++ would do. Do you like hardcore affine typing by default or dislike it?&lt;p&gt;Another way to think about it is that modulo &lt;i&gt;some&lt;/i&gt; big differences: Rust bundles (and mandates) a bunch of stuff you opt into in C++: a uniform set of best practices, hardcore static analysis, a credible strategy for catching memory safety issues and UB and thread safety issues. (The case is overstated about the difference in efficacy of e.g. ASAN and the borrow checker, they have pros and cons and it’s not a 1-bit debate).&lt;p&gt;C++ tooling has a few important edges (though Rust is catching up): clangd is usually (always?) faster and more stable than rust-analyzer but you can throw hardware at it so it’s not a huge deal.&lt;p&gt;Cargo is just a dunk below some project size. Above some project size the story is still evolving.&lt;p&gt;It’s just not as big of a difference as you often hear one way or the other. I’d probably default to Rust unless I had library interop reasons to go C++ (which is often).</text></comment>
<story><title>C++23: Removing garbage collection support</title><url>https://www.sandordargo.com/blog/2023/11/01/cpp23-garbage-collection</url></story><parent_chain><item><author>wg0</author><text>I have this impression that modern C++ is far more complex with a far more large surface area (from the perspective of learning the language) than Rust.&lt;p&gt;Because I am not expert in both, what folks that came from C++ to Rust or have to work regularly work with both say about that?</text></item></parent_chain><comment><author>dthul</author><text>I work with both, having started with C++ about 17 years ago, and agree that Rust feels like a relatively simple language compared to C++. Rust might feel harder to learn initially because the borrow checker won&amp;#x27;t let you compile certain programs, but once you are over this initial hump, the rest is quite straightforward.</text></comment>