Add a compiler attribute for methods that must be overriden by a subclass

Originator:dan
Number:rdar://19916629 Date Originated:22-Feb-2015 06:44 PM
Status:Open Resolved:
Product:iOS SDK Product Version:
Classification:Enhancement Reproducible:Always
 
Summary:
Occasionally you may have a situation where a particular method may need to be implemented for a subclass. 

The current Cocoa convention is to throw a runtime exception if the method is called on the superclass, but this is dangerous and could be made into a much safer compile-time error with the addition of a compiler annotation.

An example would be where you have a protocol, and a base concrete implementation - that needs subclassing to be properly useful/functional.

An example use case is here: https://gist.github.com/DanielTomlinson/806b6c8fe96957156f72

Thanks!

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!