Remix.run Logo
▲ gignico 3 hours ago

I love C++, in the C++11 days I even organized a local C++ User Group at my university, and I've used it for the last 20 years as my main language.

I still appreciate its many merits but since a bit more than a year I migrated to Rust and I find it very difficult to look back, except for maintaining my previous C++ projects.

Surprisingly, it's not Rust's memory safety features that I miss the most when turning back to C++. It's mostly the absence of algebraic data types and pattern matching, and the split between compile-time and runtime polymorphism, i.e. concepts vs virtual classes, where in Rust you just have traits and use them for everything. On top of that the tooling and the ecosystem are just amazing.

There's a proposal for pattern matching sitting there under the committee's desk for some years now. With the mess that the standard committee is going through I really doubt they will be able to ship pattern matching for C++29 or even later. Too little too late.

So to answer the question, yes, I still appreciate the merits of C++ but I don't enjoy writing it as much as I have in the past.

▲bestouff 3 hours ago | parent [-]

This. Since Rust C++ has lost it's appeal for me. It used to have the good balance of performance/effort, but nowadays I wouldn't dare starting a new project using C++. Even LLMs are way better at coding in Rust.

▲munksbeer 18 minutes ago | parent [-]

Not a troll question, because I am thinking of starting a fairly chunky project in Rust, potentially around 500k LOC. Are compile times really as bad as people suggest, in Rust? I'll be going agentic development, so it will be iterating a lot.