Andy Matuschak@andy_matuschakBut you can make it work for your types! https://mikeash.com/pyblog/friday-qa-2015-04-17-lets-build-swiftarray.html…Quote TweetDavid Smith@Catfish_Man · Jun 22, 2015Reminder that copy-on-write in Swift is a feature of Array, Dictionary, etc… not of structs in general. It’s not automatic for your types.Show this thread8:51 PM · Jun 22, 2015·Twitter Web Client11 Retweets39 Likes
Nacho Soto@NachoSoto·Jun 22, 2015Replying to @andy_matuschak@andy_matuschak @Catfish_Man really!? so all this time, when we’ve been saying “value semantics”, they’re not equal for all value types?21
Andy Matuschak@andy_matuschak·Jun 22, 2015@NachoSoto @Catfish_Man Huh? No, copy-on-write-ness is what’s different. That’s not part of semantics—it’s an optimization.13
Jeffrey Bergier@jeffburg·Jun 22, 2015Replying to @andy_matuschak@andy_matuschak @Catfish_Man would it be possible to write a category extension that implements this for all your custom structs?