[swift-evolution] [swift-evolution-announce] [Review] SE-0026 Abstract classes and methods

Matthew Johnson matthew at anandabits.com
Sun Feb 28 09:10:51 CST 2016

> 	• What is your evaluation of the proposal?

-1.  I would prefer to focus on protocol-oriented solutions which I believe are generally more robust.  I passionately dislike a requirement to subclass by libraries and frameworks and would prefer to guide the Swift community away from that approach.  Introducing abstract classes would do the opposite.

I would prefer to see the the generics and protocol-related features fully fleshed out in Swift 3 and Swift 4 and allow the community to identify approaches to design that do not rely on inheritance.  

If there remain use cases addressed by abstract classes for which we do not have an acceptable protocol-oriented alternative we could consider the feature again at that time with better knowledge of what use cases are uniquely addressed by the more brittle and inflexible inheritance-based approach.

> 	• Is the problem being addressed significant enough to warrant a change to Swift?

Maybe, but I am not convinced yet.  We should allow the language to evolve a bit more before making a final judgment about this.

> 	• Does this proposal fit well with the feel and direction of Swift?

No.  It is a classic OO inheritance feature and Swift leans heavily in the direction of protocols.

> 	• If you have used other languages or libraries with a similar feature, how do you feel that this proposal compares to those?

It is about the same, including the all downsides of library designs that require subclassing by consumers.  

> 	• How much effort did you put into your review? A glance, a quick reading, or an in-depth study?

A brief glance.  However, my review is informed by lots of experience with both implementing and using libraries and frameworks that require subclassing (including use of abstract classes).  This experience has taught me that it is generally best to look for other solutions.

> More information about the Swift evolution process is available at:
> https://github.com/apple/swift-evolution/blob/master/process.md <https://github.com/apple/swift-evolution/blob/master/process.md>
> Thank you,
> -Joe
> Review Manager
> _______________________________________________
> swift-evolution-announce mailing list
> swift-evolution-announce at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution-announce

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160228/ae3db52c/attachment.html>

More information about the swift-evolution mailing list