[swift-evolution] [Draft] Allow declaration of abstract functions and properties on classes

Evan Maloney emaloney at gilt.com
Fri Feb 26 09:46:30 CST 2016


> Well not exactly, if you want the same behaviors in subclasses of UIViewController and UITableViewController :
> - with protocols + extensions, you write in once and apply it to each of your subclasses
> - with abstract classes you have to write 2 abstract classes, one for direct UIViewController subclasses, one for UITableViewController subclasses

That's a problem with class hierarchies in general, not with abstract classes.

You can use the same argument to call for the removal of classes from Swift, which is why I think the fundamental question is, are classes intended to be first-class citizens in Swift?


More information about the swift-evolution mailing list