Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Is this really true? What do you mean by value types? The types that implement copy or any struct types? Because I think struct types only get moved




Move and copy are both the same operation under the hood, move just means that the old version is marked invalid and not available for use anymore.

For large structs (or enums), move and copy both compile into memcpy. If the structures are large, this can take a lot of time.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: