AI-powered
podcast player
Listen to all your favourite podcasts with AI-powered features
The Benefits of Guaranteed Copulation in C++
Rust has a concept called guarantee copulation. In C, if you've got to return a large object back from a function, you do it normally through an out pointer. But in Rust that's now guaranteed as part of the language and it's got to be. So there are the performance benefits we get. And I think it gives you a more intuitive code. It's more readable code because a return is a return. They're what I call the quick wins. The interesting one you mentioned was pointers and the whole memory one. Of course, it's the big stick the rust people use to beat everybody else up saying, oh, yes, they do. That's a mute point