As a big c++ fan, new projects are generally choosing Rust, which I would agree with, even though I do indeed love C++
I read that as "is c++ still relevant for new features, given Rust and its popularity", not "who is still using C++".
Personally, I think it is still relevant. Many people thought Kotlin could overtake Java, Java reinvented itself with new initiatives/features and was saved from becoming irrelevant.
Java vs. Kotlin is a different matter. It's still an open question if C++ even could match Rust's features, not to say if it (the committee) wants to, and the answer seems to be "no".
The feature parity question goes both ways: rust won't ever be able to express some things that are possible in C++.
Like?
Algorithms that safely mutate the same data structure on multiple threads and do so safely because of some complex algorithmic properties that guarantee that the changes do not overlap?
Why can Rust not do that?
How do you create shared mutable ownership of overlapping ranges of a single flat array in rust?
similarly except the algorithm to Mutex<[T]> and Arc?
How does this work e.g. for an array of integers that several workers threads write to at random, non-overlapping positions?
1. by implementing your complex algorithm?
2. if they don't overlap, they can't be random, can they?
Rust can literally do anything programmatically. Idk why you think it cannot do something.
They can be unordered, e.g. when reshuffling data into a new buffer based on a permutation that was computed separately. How do you avoid locking the output buffer in rust?
sry wrong link:
https://news.ycombinator.com/item?id=50365335
Rust can do that just fine. https://doc.rust-lang.org/stable/std/cell/struct.UnsafeCell..... "some complex algorithmic properties that guarantee that the changes do not overlap" are exactly the place to use unsafe and encapsulate it.
If you mean things that formally create a data race, then C++ cannot do that either.
Is it still relevant, JFC. The way people on this forum manage to sequester themselves from reality. Let me reverse it: is Rust relevant? Mozilla developed Rust, abandoned their Rust browser, and only 10% of Firefox is written in Rust. Maybe 1% of modules in Chrome and Linux are written in Rust, if that. And what of Rust applications written from scratch? Can you name ten applications that have, say, more than 100,000 users? Impossible mode: they can't be developer tools for other Rust developers (uv, bun, etc.), they must actually be an application used in the line-of-business or by the consumer.