[swift-evolution] [swift-evolution-announce] [Review] SE-0156: Class and Subtype existentials
jordan_rose at apple.com
Tue Feb 28 15:19:28 CST 2017
[Proposal: https://github.com/apple/swift-evolution/blob/master/proposals/0156-subclass-existentials.md <https://github.com/apple/swift-evolution/blob/master/proposals/0156-subclass-existentials.md>]
Well-written, good job, useful feature, long-since-needed-because-of-ObjC, +1.
> 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.
'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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution