Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
mplewis9z
· 2y ago · 0 comments
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.
Comments
[–]
GrumpySloth
2y ago
It’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.