TWiR quote of the week

Thanks to the borrow checker, you can’t generally tell the difference between shallow and deep copies in rust unless the type happens to have interior mutability. This makes shallow copies the clear winner for the majority of use cases in rust, and so it’s simply not something the average rust author thinks about every day.

@ExpHP in Contracts of the Clone trait? - #4 by ExpHP

(Long, but I found it insightful.)

4 Likes