> when every data structure is COPIED on every function call
Swift structs use copy on write, so they aren’t actually copied on every function call.
Swift structs use copy on write, so they aren’t actually copied on every function call.
It’s a common misconception that comes from the standard library data structures, which almost all do implement CoW