3 ms·
In practice, I think it's easier to use linting and type-systems to prevent other code from mutating you stuff than defensive copying.
by lambda_garden 3y ago
In practice, I think it's easier to use linting and type-systems to prevent other code from mutating you stuff than defensive copying.
- VPenkov 3y agoYou could make the same argument backwards though - many people may find it easier to do deep copies rather than throwing extra software they might not necessarily be familiar with.