[swift-evolution] [Pitch] consistent public access modifiers

Jordan Rose jordan_rose at apple.com
Wed Feb 15 20:08:13 CST 2017


> On Feb 12, 2017, at 21:52, Slava Pestov via swift-evolution <swift-evolution at swift.org> wrote:
> 
> Also, note that there will be at least one other similar annotation, but for structs — the evolution document calls it @fixedContents. We want a way to declare that the set of stored properties in a struct will never change, allowing clients to make assumptions about its layout. Unlike @closed enums, @fixedContents structs mostly behave the same. The one important difference is that it will be possible to define designated initializers of @fixedContents structs inside extensions from another module.

The "@fixedContents mostly doesn't change the behavior of a struct" makes me think it is unimportant for these two annotations to have the same name.

Jordan



More information about the swift-evolution mailing list