[swift-evolution] [Review] SE-0026 Abstract classes and methods
Thorsten Seitz
tseitz42 at icloud.com
Mon Feb 29 11:06:38 CST 2016
> Am 26.02.2016 um 22:51 schrieb plx via swift-evolution <swift-evolution at swift.org>:
>
> Abstract classes and access control issues would need to be addressed. EG: is the below allowed, or not:
>
> abstract public class ClassWithInternalAbstractMembers {
>
> // abstract members less visible than the containing type:
> internal abstract func someFunctionOnlyVisibleWithinThisModule()
> private abstract func someFunctionOnlyVisibleWithinThisFile()
>
> }
Of course, why not? This allows template methods (protected would be even more nice for those) which is an important use case for abstract classes IMO.
-Thorsten
More information about the swift-evolution
mailing list