[swift-evolution] Philosophy of Swift

Dave Abrahams dabrahams at apple.com
Wed Jun 8 18:13:55 CDT 2016

on Wed Jun 08 2016, Paul Cantrell <swift-evolution at swift.org> wrote:

> The interplay of the first two and the last two is what makes the
> language unique. For example, structs have a simple, high-level
> programmer model — “pass by value semantics” — but the compiler jumps
> through all those COW hoops to make them perform _most_ of the time as
> if they were C structs statically allocated and then passed by
> pointer.

I have no argument with most of what you wrote, but this part is just
inaccurate.  Plain structs are never CoW'd, and the compiler doesn't
introduce CoW.  The standard library implements CoW “manually” for
specific types like Array and String. 


More information about the swift-evolution mailing list