<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 28, 2017, at 1:19 PM, Jordan Rose via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=us-ascii" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="" applecontenteditable="true"><div class="">[Proposal: <a href="https://github.com/apple/swift-evolution/blob/master/proposals/0156-subclass-existentials.md" class="">https://github.com/apple/swift-evolution/blob/master/proposals/0156-subclass-existentials.md</a>]</div><div class=""><br class=""></div><div class="">Well-written, good job, useful feature, long-since-needed-because-of-ObjC, +1.</div><div class=""><br class=""></div><div class="">One nitpick:</div><div class=""><br class=""></div><div class=""><blockquote type="cite" class="">This proposal merges the concepts of `class` and `AnyObject`, which now have the same meaning: they represent an existential for classes. To get rid of the duplication, we suggest only keeping `AnyObject` around. To reduce source-breakage to a minimum, `class` could be redefined as `typealias class = AnyObject` and give a deprecation warning on `class` for the first version of Swift this proposal is implemented in. Later, `class` could be removed in a subsequent version of Swift.<br class=""></blockquote><br class="">'class' is a keyword, so we don't get to drop the special parsing no matter what. We can still deprecate it, but I wouldn't bother trying to jam it into a typealias.</div></div></div></blockquote><div><br class=""></div><div>Yeah, why bother making </div><div><br class=""></div><div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(186, 45, 162);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">typealias</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> </span><span style="font-variant-ligatures: no-common-ligatures" class="">class</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> = </span><span style="font-variant-ligatures: no-common-ligatures; color: #703daa" class="">AnyObject</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(186, 45, 162);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #703daa" class=""><br class=""></span></div><div style="margin: 0px; line-height: normal;" class="">compile?</div></div><div><br class=""></div><div>We should just provide autocorrect to migrate this:</div><div><br class=""></div><div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(186, 45, 162);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">protocol</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> P: </span><span style="font-variant-ligatures: no-common-ligatures" class="">class</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> {}</span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""><br class=""></span></div></div><div>into this:</div><div><br class=""></div><div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(112, 61, 170);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #ba2da2" class="">protocol</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> P: </span><span style="font-variant-ligatures: no-common-ligatures" class="">AnyObject</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> {}</span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""><br class=""></span></div></div><div>and warn if the old syntax is used (while continuing to support it just as it works now). We can then remove the parser rules that accept the first form (using ‘class’) in Swift 5.</div><div><br class=""></div><div>Otherwise strong +1 as it is obviously needed for proper ObjC support.</div><div><br class=""></div><blockquote type="cite" class=""><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="" applecontenteditable="true"><div class=""><br class=""></div><div class="">Jordan</div></div>_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-evolution<br class=""></div></blockquote></div><br class=""></body></html>