News for hackers. Stuff that matters.
Re:More Rust compared to C++ by SamReidHughes on Wednesday April 08, 2015 @04:05AM (#9339289)
> Could you elaborate on that?

If the value isn't passed by (perhaps elidably) copying, that would mean it's getting allocated on the heap and deallocated.

Re:More Rust compared to C++ by jarrettc on Wednesday April 08, 2015 @10:46AM (#9341093)
Yes, I had understood the struct's memory to be on the heap. My thinking was, keeping the memory on the heap allows for inexpensive moves. Whereas, the pointer to the heap space may indeed be on the stack, as far as I know.

But I could be mistaken. This is all based on hearsay--just stuff I've read about the Rust compiler. I don't actually work on the compiler myself.