Though honestly, in C++ it is very rare I use something other than vector (potentially wrapped for specific use case, like boost flat_map)
Though honestly, in C++ it is very rare I use something other than vector (potentially wrapped for specific use case, like boost flat_map)
(And yes, it's a niche data structure, vecs are far more common, but it's people's go-to "the borrow checker restricts you too much" example anyway.)
Seems a counter productive go-to argument given the amount of effort we (c++ coders) generally put in to avoiding non-adjacent memory access :)
FWIW I think the Rust community has done itself a disservice by focusing on the safety benefits. Const by default and move by default are much bigger deals in the day to day coding experience, but it’s hard to get across just how awesome they are.
That book looks great, thanks - should take me through a few corners I’ve yet to meet while keeping me entertained.
After 20 years of C++ and about the same number of hours of Rust, Rust makes me feel like Fire Mario because when I come to do a strict correctness and memory efficiency pass after writing something - it’s already correct. I suspect this will have a compound interest-like effect, similar to good code coverage empowering change.