<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Feb 8, 2017, at 7:02 PM, Adrian Zubarev via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="bloop_markdown" style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(254, 254, 254);"><p style="margin: 15px 0px; -webkit-margin-before: 0px;" class="">Hurray, I cannot wait to get the consistent behavior of<span class="Apple-converted-space">&nbsp;</span><code style="font-family: Menlo, Consolas, 'Liberation Mono', Courier, monospace; font-size: 10pt; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgb(248, 248, 248); color: inherit; border: 1px solid rgb(234, 234, 234); margin: 0px 2px; padding: 0px 5px; word-break: normal; word-wrap: normal; -webkit-margin-before: 0px;" class="">open/public protocol</code>s. I’m not sure I could follow the idea behind the proposed<span class="Apple-converted-space">&nbsp;</span><code style="font-family: Menlo, Consolas, 'Liberation Mono', Courier, monospace; font-size: 10pt; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgb(248, 248, 248); color: inherit; border: 1px solid rgb(234, 234, 234); margin: 0px 2px; padding: 0px 5px; word-break: normal; word-wrap: normal;" class="">closed</code><span class="Apple-converted-space">&nbsp;</span>keyboard/access modifier. It almost felt like<span class="Apple-converted-space">&nbsp;</span><code style="font-family: Menlo, Consolas, 'Liberation Mono', Courier, monospace; font-size: 10pt; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgb(248, 248, 248); color: inherit; border: 1px solid rgb(234, 234, 234); margin: 0px 2px; padding: 0px 5px; word-break: normal; word-wrap: normal;" class="">closed == final public</code>, am I mistaken something here?</p></div></div></blockquote><div><br class=""></div><div><br class=""></div><div>The best way to think about `closed` is to just think about `public enum` as it exists today. &nbsp;The contract implies that no new cases will be added because user code is allowed to perform exhaustive switch over the cases. &nbsp;Adding a case is a breaking change.</div><div><br class=""></div><div>The insight behind this proposal is that we can also support these semantics with classes and protocols. &nbsp;A `closed` class may have subclasses within the module so long as they are public, but no direct subclasses may be added in future versions (descendants may still be added if the `closed` class has a non-final subclass). &nbsp;Adding a subclass in the future becomes a breaking change.</div><div><br class=""></div><div>Similarly with protocols, no new conformances will be added in future versions of the library. &nbsp;As with `closed` classes, if a non-final class conforms to a `closed` protocol subclasses may still be added in the future.</div><div><br class=""></div>The relationship between `closed` and `final public` is interesting. &nbsp;`final public` is equivalent to `final closed` under this proposal as long as the semantics of `final` implies not only that there are no subclasses *right now*, but also that &nbsp;that no subclasses will ever be added *in the future*. &nbsp;This is the semantics suggested in the Library Evolution document - "final&nbsp;may not be removed from a class or its members. (The presence of&nbsp;final&nbsp;enables optimization.)”. &nbsp;This is a degenerate case of `closed`: new subclasses cannot be added because `final` declares that there will *never be* any subclasses.</div><div><blockquote type="cite" class=""><div class=""><div class="bloop_markdown" style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(254, 254, 254);"><p style="margin: 15px 0px;" class="">Furthermore, I really would love if the community could revisit how<span class="Apple-converted-space">&nbsp;</span><code style="font-family: Menlo, Consolas, 'Liberation Mono', Courier, monospace; font-size: 10pt; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgb(248, 248, 248); color: inherit; border: 1px solid rgb(234, 234, 234); margin: 0px 2px; padding: 0px 5px; word-break: normal; word-wrap: normal; -webkit-margin-before: 0px;" class="">open/public</code><span class="Apple-converted-space">&nbsp;</span>really should behave. When<span class="Apple-converted-space">&nbsp;</span><code style="font-family: Menlo, Consolas, 'Liberation Mono', Courier, monospace; font-size: 10pt; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgb(248, 248, 248); color: inherit; border: 1px solid rgb(234, 234, 234); margin: 0px 2px; padding: 0px 5px; word-break: normal; word-wrap: normal;" class="">open</code><span class="Apple-converted-space">&nbsp;</span>was implemented and I tried it out without reading the proposal first I bumped into things like<span class="Apple-converted-space">&nbsp;</span><code style="font-family: Menlo, Consolas, 'Liberation Mono', Courier, monospace; font-size: 10pt; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgb(248, 248, 248); color: inherit; border: 1px solid rgb(234, 234, 234); margin: 0px 2px; padding: 0px 5px; word-break: normal; word-wrap: normal;" class="">open init()</code><span class="Apple-converted-space">&nbsp;</span>which felt really odd. I understand the argumentation from the proposal, but it feels wrong and inconsistent to me.</p><p style="margin: 15px 0px;" class="">Here’s how I would have imagined<span class="Apple-converted-space">&nbsp;</span><code style="font-family: Menlo, Consolas, 'Liberation Mono', Courier, monospace; font-size: 10pt; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgb(248, 248, 248); color: inherit; border: 1px solid rgb(234, 234, 234); margin: 0px 2px; padding: 0px 5px; word-break: normal; word-wrap: normal; -webkit-margin-before: 0px;" class="">open</code><span class="Apple-converted-space">&nbsp;</span>vs.<span class="Apple-converted-space">&nbsp;</span><code style="font-family: Menlo, Consolas, 'Liberation Mono', Courier, monospace; font-size: 10pt; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgb(248, 248, 248); color: inherit; border: 1px solid rgb(234, 234, 234); margin: 0px 2px; padding: 0px 5px; word-break: normal; word-wrap: normal;" class="">public</code>. IMHO<span class="Apple-converted-space">&nbsp;</span><code style="font-family: Menlo, Consolas, 'Liberation Mono', Courier, monospace; font-size: 10pt; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgb(248, 248, 248); color: inherit; border: 1px solid rgb(234, 234, 234); margin: 0px 2px; padding: 0px 5px; word-break: normal; word-wrap: normal;" class="">public</code><span class="Apple-converted-space">&nbsp;</span>should really mean, you cannot subclass, conform or override something in module B from module A.</p><p style="margin: 15px 0px;" class="">Modified samples from SE–0117:</p><pre style="margin: 15px 0px; font-family: Menlo, Consolas, 'Liberation Mono', Courier, monospace; font-size: 10pt; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgb(248, 248, 248); color: inherit; border: 1px solid rgb(204, 204, 204); overflow: auto; padding: 4px 8px; word-break: normal; word-wrap: normal;" class=""><code class="swift" style="font-family: Menlo, Consolas, 'Liberation Mono', Courier, monospace; font-size: 10pt; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgb(248, 248, 248); color: inherit; border: 0px; margin: 0px; padding: 0px; word-break: normal; word-wrap: normal; -webkit-margin-before: 0px;">// This class is not subclassable outside of ModuleA.
public class NonSubclassableParentClass {
    // This method &gt;is not overridable outside of ModuleA.
    public func foo() {}

    // This method is not overridable outside of ModuleA because
    // its class restricts its access level.
    // It is INVALID to declare it as `open`.
    public func bar() {}

    // The behavior of `final` methods remains unchanged.
    public final func baz() {}
}

// This class is subclassable both inside and outside of ModuleA.
open class SubclassableParentClass {
     
    // Designated initializer that is not overridable outside ModuleA
    public init()
     
    // Another designated initializer that is overridable outside ModuleA
    open init(foo: Int)
     
    // This property is not overridable outside of ModuleA.
    public var size : Int

    // This method is not overridable outside of ModuleA.
    public func foo() {}

    // This method is overridable both inside and outside of ModuleA.
    open func bar() {}

    /// The behavior of a `final` method remains unchanged.
    public final func baz() {}
}

/// The behavior of `final` classes remains unchanged.
public final class FinalClass { }
</code></pre><pre style="margin: 15px 0px; font-family: Menlo, Consolas, 'Liberation Mono', Courier, monospace; font-size: 10pt; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgb(248, 248, 248); color: inherit; border: 1px solid rgb(204, 204, 204); overflow: auto; padding: 4px 8px; word-break: normal; word-wrap: normal;" class=""><code class="swift" style="font-family: Menlo, Consolas, 'Liberation Mono', Courier, monospace; font-size: 10pt; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgb(248, 248, 248); color: inherit; border: 0px; margin: 0px; padding: 0px; word-break: normal; word-wrap: normal; -webkit-margin-before: 0px;">/// ModuleB:

import ModuleA

// This is allowed since the superclass is `open`.
class SubclassB : SubclassableParentClass {
     
    // Iff certain conditions are met, the superclass initializers are inherited.
    // `init` will stay `public` and won't be overridable.
    //
    // If the conditions are not met, then `init` is not inherited. That does not
    // mean that we can create a new designated `init` that matches it's superclass's
    // designated initializer. The behavior should be consistent, like the  
    // superclass's function `foo` is reserved and not overridable, so is `init`
    // reserved in this case and not overridable.
     
    // This is allowed since the superclass's initializer is `open`
    override init(foo: Int) {
        super.init(foo: foo)
    }
     
    init(bar: Int) {
        // We could call a super designated initializer from here
        super.init()
        // or
        super.init(foo: bar)
    }
     
    // This is invalid because it overrides a method that is
    // defined outside of the current module but is not `open'.
    override func foo() { }

    // This is allowed since the superclass's method is overridable.
    // It does not need to be marked `open` because it is defined on
    // an `internal` class.
    override func bar() { }
}
</code></pre><p style="margin: 15px 0px;" class=""><code style="font-family: Menlo, Consolas, 'Liberation Mono', Courier, monospace; font-size: 10pt; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgb(248, 248, 248); color: inherit; border: 1px solid rgb(234, 234, 234); margin: 0px 2px; padding: 0px 5px; word-break: normal; word-wrap: normal; -webkit-margin-before: 0px;" class="">required</code><span class="Apple-converted-space">&nbsp;</span>should always match the same scope level as the type in which it’s defined. That means if the class is<span class="Apple-converted-space">&nbsp;</span><code style="font-family: Menlo, Consolas, 'Liberation Mono', Courier, monospace; font-size: 10pt; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgb(248, 248, 248); color: inherit; border: 1px solid rgb(234, 234, 234); margin: 0px 2px; padding: 0px 5px; word-break: normal; word-wrap: normal;" class="">open</code>, than any of it’s<span class="Apple-converted-space">&nbsp;</span><code style="font-family: Menlo, Consolas, 'Liberation Mono', Courier, monospace; font-size: 10pt; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgb(248, 248, 248); color: inherit; border: 1px solid rgb(234, 234, 234); margin: 0px 2px; padding: 0px 5px; word-break: normal; word-wrap: normal;" class="">required</code><span class="Apple-converted-space">&nbsp;</span>initializers will be<span class="Apple-converted-space">&nbsp;</span><code style="font-family: Menlo, Consolas, 'Liberation Mono', Courier, monospace; font-size: 10pt; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgb(248, 248, 248); color: inherit; border: 1px solid rgb(234, 234, 234); margin: 0px 2px; padding: 0px 5px; word-break: normal; word-wrap: normal;" class="">open</code><span class="Apple-converted-space">&nbsp;</span>as well.</p><div style="margin: 15px 0px;" class=""><br class="webkit-block-placeholder"></div></div><div class="bloop_original_html" style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(254, 254, 254);"><div id="bloop_customfont" style="font-family: Helvetica, Arial; font-size: 13px; margin: 0px;" class=""><br class=""></div><br class=""><div id="bloop_sign_1486600157602554112" class="bloop_sign"><div style="font-family: helvetica, arial; font-size: 13px;" class="">--&nbsp;<br class="">Adrian Zubarev<br class="">Sent with Airmail</div></div><br class=""><p class="airmail_on" style="margin: 15px 0px;">Am 9. Februar 2017 um 00:49:04, Xiaodi Wu via swift-evolution (<a href="mailto:swift-evolution@swift.org" style="color: rgb(65, 131, 196); background-color: inherit; text-decoration: none;" class="">swift-evolution@swift.org</a>) schrieb:</p><blockquote type="cite" class="clean_bq" style="margin: 15px 0px;"><span style="margin-top: 0px; margin-bottom: 0px;" class=""><div class=""><div class=""></div><div class="">I agree very much with rationalizing access levels, but I'm not sure I like this proposal for public vs. closed. How would the compiler stop me from editing my own code if something is closed? The answer must be that it can't, so I can't see it as a co-equal to open but rather simply a statement of intention. Therefore I think use cases for the proposed behavior of closed would be better served by annotations and proper semantic versioning.<br class=""><br class="">As this change didn't seem in scope for Swift 4 phase 1, I've held off on discussing my own thoughts on access levels. The idea I was going to propose in phase 2 was to have simply open and public enums (and protocols). I really think that completes access levels in a rational way without introducing another keyword.<br class=""><div class="gmail_quote"><div dir="ltr" class="">On Wed, Feb 8, 2017 at 17:05 Matthew Johnson via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" style="color: rgb(65, 131, 196); background-color: inherit; text-decoration: none;" class="">swift-evolution@swift.org</a>&gt; wrote:<br class=""></div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><div class="gmail_msg" style="margin-top: 0px; word-wrap: break-word;"><div class="gmail_msg">I’ve been thinking a lot about our public access modifier story lately in the context of both protocols and enums.&nbsp; I believe we should move further in the direction we took when introducing the `open` keyword.&nbsp; I have identified what I think is a promising direction and am interested in feedback from the community.&nbsp; If community feedback is positive I will flesh this out into a more complete proposal draft.</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Background and Motivation:</div><div class="gmail_msg"><br class="gmail_msg"></div>In Swift 3 we had an extended debate regarding whether or not to allow inheritance of public classes by default or to require an annotation for classes that could be subclassed outside the module.&nbsp; The decision we reached was to avoid having a default at all, and instead make `open` an access modifier.&nbsp; The result is library authors are required to consider the behavior they wish for each class.&nbsp; Both behaviors are equally convenient (neither is penalized by requiring an additional boilerplate-y annotation).<div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">A recent thread (<a href="https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20170206/031566.html" class="gmail_msg" target="_blank" style="color: rgb(65, 131, 196); background-color: inherit; text-decoration: none;">https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20170206/031566.html</a>) discussed a similar tradeoff regarding whether public enums should commit to a fixed set of cases by default or not.&nbsp; The current behavior is that they *do* commit to a fixed set of cases and there is no option (afaik) to modify that behavior.&nbsp; The Library Evolution document (<a href="https://github.com/apple/swift/blob/master/docs/LibraryEvolution.rst#enums" class="gmail_msg" target="_blank" style="color: rgb(65, 131, 196); background-color: inherit; text-decoration: none;">https://github.com/apple/swift/blob/master/docs/LibraryEvolution.rst#enums</a>) suggests a desire to change this before locking down ABI such that public enums *do not* make this commitment by default, and are required to opt-in to this behavior using an `@closed` annotation.</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">In the previous discussion I stated a strong preference that closed enums *not* be penalized with an additional annotation.&nbsp; This is because I feel pretty strongly that it is a design smell to: 1) expose cases publicly if consumers of the API are not expected to switch on them and 2) require users to handle unknown future cases if they are likely to switch over the cases in correct use of the API.</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">The conclusion I came to in that thread is that we should adopt the same strategy as we did with classes: there should not be a default.</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">There have also been several discussions both on the list and via Twitter regarding whether or not we should allow closed protocols.&nbsp; In a recent Twitter discussion Joe Groff suggested that we don’t need them because we should use an enum when there is a fixed set of conforming types.&nbsp; There are at least two &nbsp;reasons why I still think we *should* add support for closed protocols.</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">As noted above (and in the previous thread in more detail), if the set of types (cases) isn’t intended to be fixed (i.e. the library may add new types in the future) an enum is likely not a good choice.&nbsp; Using a closed protocol discourages the user from switching and prevents the user from adding conformances that are not desired.</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Another use case supported by closed protocols is a design where users are not allowed to conform directly to a protocol, but instead are required to conform to one of several protocols which refine the closed protocol.&nbsp; Enums are not a substitute for this use case.&nbsp; The only option is to resort to documentation and runtime checks.</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Proposal:</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">This proposal introduces the new access modifier `closed` as well as clarifying the meaning of `public` and expanding the use of `open`.&nbsp; This provides consistent capabilities and semantics across enums, classes and protocols.</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">`open` is the most permissive modifier.&nbsp; The symbol is visible outside the module and both users and future versions of the library are allowed to add new cases, subclasses or conformances. &nbsp;(Note: this proposal does not introduce user-extensible `open` enums, but provides the syntax that would be used if they are added to the language)</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">`public` makes the symbol visible without allowing the user to add new cases, subclasses or conformances.&nbsp; The library reserves the right to add new cases, subclasses or conformances in a future version.</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">`closed` is the most restrictive modifier.&nbsp; The symbol is visible publicly with the commitment that future versions of the library are *also* prohibited from adding new cases, subclasses or conformances.&nbsp; Additionally, all cases, subclasses or conformances must be visible outside the module.</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Note: the `closed` modifier only applies to *direct* subclasses or conformances.&nbsp; A subclass of a `closed` class need not be `closed`, in fact it may be `open` if the design of the library requires that.&nbsp; A class that conforms to a `closed` protocol also need not be `closed`.&nbsp; It may also be `open`.&nbsp; Finally, a protocol that refines a `closed` protocol need not be `closed`.&nbsp; It may also be `open`.</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">This proposal is consistent with the principle that libraries should opt-in to all public API contracts without taking a position on what that contract should be.&nbsp; It does this in a way that offers semantically consistent choices for API contract across classes, enums and protocols.&nbsp; The result is that the language allows us to choose the best tool for the job without restricting the designs we might consider because some kinds of types are limited with respect to the `open`, `public` and `closed` semantics a design might require.</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Source compatibility:</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">This proposal affects both public enums and public protocols.&nbsp; The current behavior of enums is equivalent to a `closed` enum under this proposal and the current behavior of protocols is equivalent to an `open` protocol under this proposal.&nbsp; Both changes allow for a simple mechanical migration, but that may not be sufficient given the source compatibility promise made for Swift 4.&nbsp; We may need to identify a multi-release strategy for adopting this proposal.</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Brent Royal-Gordon suggested such a strategy in a discussion regarding closed protocols on Twitter:</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">* In Swift 4: all unannotated public protocols receive a warning, possibly with a fix-it to change the annotation to `open`.</div><div class="gmail_msg">* Also in Swift 4: an annotation is introduced to opt-in to the new `public` behavior.&nbsp; Brent suggested `@closed`, but as this proposal distinguishes `public` and `closed` we would need to identify something else.&nbsp; I will use `@annotation` as a placeholder.</div><div class="gmail_msg">* Also In Swift 4: the `closed` modifier is introduced.</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">* In Swift 5 the warning becomes a compiler error. &nbsp;`public protocol` is not allowed.&nbsp; Users must use `@annotation public protocol`.</div><div class="gmail_msg">* In Swift 6 `public protocol` is allowed again, now with the new semantics. &nbsp;`@annotation public protocol` is also allowed, now with a warning and a fix-it to remove the warning.</div><div class="gmail_msg">* In Swift 7 `@annotation public protocol` is no longer allowed.</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">A similar mult-release strategy would work for migrating public enums.</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg"><br class="gmail_msg"></div></div>_______________________________________________<br class="gmail_msg">swift-evolution mailing list<br class="gmail_msg"><a href="mailto:swift-evolution@swift.org" class="gmail_msg" target="_blank" style="color: rgb(65, 131, 196); background-color: inherit; text-decoration: none;">swift-evolution@swift.org</a><br class="gmail_msg"><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" class="gmail_msg" target="_blank" style="color: rgb(65, 131, 196); background-color: inherit; text-decoration: none;">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class="gmail_msg" style="margin-bottom: 0px;"></blockquote></div>_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" style="color: rgb(65, 131, 196); background-color: inherit; text-decoration: none;" class="">swift-evolution@swift.org</a><br class=""><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" style="color: rgb(65, 131, 196); background-color: inherit; text-decoration: none;" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class=""></div></div></span></blockquote></div><div class="bloop_markdown" style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(254, 254, 254);"><div style="margin: 15px 0px; -webkit-margin-before: 0px;" class=""><br class="webkit-block-placeholder"></div></div><span style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(254, 254, 254); float: none; display: inline !important;" class="">_______________________________________________</span><br style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(254, 254, 254);" class=""><span style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(254, 254, 254); float: none; display: inline !important;" class="">swift-evolution mailing list</span><br style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(254, 254, 254);" class=""><a href="mailto:swift-evolution@swift.org" style="color: rgb(65, 131, 196); background-color: rgb(254, 254, 254); text-decoration: none; font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">swift-evolution@swift.org</a><br style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(254, 254, 254);" class=""><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" style="color: rgb(65, 131, 196); background-color: rgb(254, 254, 254); text-decoration: none; font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(254, 254, 254);" class=""></div></blockquote></div><br class=""></body></html>