I think we’re both being pendantic on different points. If you’re saying Swift will not always use COW I agree. (and updated the article as such)
That said, no matter what optimizations the compiler makes (straight copy, reference/COW, partial element passing, etc.), structs will always behave as value types with COW semantics and the Swift compiler(s) WILL guarantee that behavior.
Again, this isn’t saying it always used COW (the technique). It did, however, honor COW behavior (the semantics). (Mutating a copy of A doesn’t change A.)
Note that compiler optimizations only work if they respect the original logic flow and program behavior. If an “optimization” changes flow or behavior, then it’s not an optimization… it’s a bug. ;)
And as such, I disagree that you must manually implement your own COW behavior under most circumstances. The only time we need to do so is when we have our own reference type (class) on which we want to overlay value semantics.