[swift-evolution] [Review] SE-0026 Abstract classes and methods
tseitz42 at icloud.com
Thu Mar 3 23:56:48 CST 2016
> Am 03.03.2016 um 23:16 schrieb Brent Royal-Gordon via swift-evolution <swift-evolution at swift.org>:
> I do completely understand your concerns about the class + protocol workaround which is currently necessary here. That's why I'm proposing we allow protocols to require inheritance, override members, create stored properties, etc. That would allow the protocol to *wholly* replace the base class, taking on the job of providing both the concrete portions of the implementation and the requirements subtypes need to satisfy.
For modeling subtype requirements we would need the ability to declare protocol members with reduced access scope like private or internal and hopefully protected, as subtype requirements most often are not public.
More information about the swift-evolution