3 ms·
If you haven’t tried Swift, copy-on-write is one of the core tenets of its value types (`struct`s, basically), and it’s almost entirely transparent.
by mplewis9z 3y ago
If you haven’t tried Swift, copy-on-write is one of the core tenets of its value types (`struct`s, basically), and it’s almost entirely transparent.
- GrumpySloth 3y agoIt’s only transparent for types that already implement copy-on-write. For custom types you need to implement it yourself, using reference typed private properties.