Open swift-ci opened 5 years ago
This change would have to go through the Swift Evolution Process. Note that it's come up several times before, so I recommend familiarizing yourself with previous discussions on the forums before writing a pitch.
Comment by Colin Roache (JIRA)
@belkadan I have enough of my own code to write, I'm just pointing out the issues remaining in Swift from a type theory perspective.
Additional Detail from JIRA
| | | |------------------|-----------------| |Votes | 0 | |Component/s | | |Labels | New Feature, LanguageFeatureRequest | |Assignee | None | |Priority | Medium | md5: 3568221af408b2c86b03354637ddf549Issue Description:
I have found numerous instances in which I would like to provide partial protocol conformance in a superclass, while leaving some of the protocol requirements unfulfilled. Traditionally this is called a partially abstract class. While Swift's protocols act as traditional purely abstract classes/structs, it would be helpful to have partially abstract classes/structs which leave some requirements for descendants to fulfill.
I would expect that abstract classes and abstract structs could not be directly initialized and that the init methods could only be called from subclasses' init methods.
I would like to use an abstract keyword like this: