▲ | empath75 7 months ago | |||||||||||||
> While this is sometimes done in C++ as well for various reasons, it's certainly not the default pattern there. If you have two things that need to point to each other, you just do that. And then you have to handle all the subtle memory bugs that you've introduced by doing that. | ||||||||||||||
▲ | int_19h 7 months ago | parent [-] | |||||||||||||
I'm not arguing that there isn't a gain here, but GP's original assertion was that > While programming in Rust, I've never thought to myself, "man, this would be so much easier to express in C++". This is a concrete example of something that is much easier to express in C++. And, sure, you do pay the tax for that (although I will also dispute the notion that it is impossible to write C++ without memory bugs; it's just hard). | ||||||||||||||
|