News for hackers. Stuff that matters.
Re:Deep Cloning Objects in JavaScript, the Modern Way by lambda_garden on Friday December 22, 2023 @07:49AM (#38733614)
In practice, I think it's easier to use linting and type-systems to prevent other code from mutating you stuff than defensive copying.
Re:Deep Cloning Objects in JavaScript, the Modern Way by VPenkov on Friday December 22, 2023 @08:38AM (#38734004)
You 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.