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

David Scrève david.screve at dlta-studio.com
Fri Mar 4 01:47:23 CST 2016



> Le 4 mars 2016 à 05:26, Dietmar Planitzer via swift-evolution <swift-evolution at swift.org> a écrit :
> 
>> What is your evaluation of the proposal?
> 
> I am in favor of the proposal. However the “Detailed design” section could use some more clarifications:
> 
> 1) Eg are abstract let’s allowed?
> 
> abstract let: String
	Yes, as they are for var.
> 
> 2) what about abstract class and static methods?
	static are not part of inheritance..then there is not abstract static method.
> 
> 3) should it be possible to import existing ObjC classes which are effectively abstract classes as true abstract classes? Eg:
	No, because we should not modify behavior of ObjC language when importing into Swift.
> 
> 4) how will abstract classes which are marked with the @objc attribute or which derive directly or indirectly from NSObject be treated from the ObjC-side?
> 
> @objc abstract class Foo {
> }
	I suggest that abstract is a Swift-only keyword…then @objc is not allowed to abstract class.

> 
> how does the ObjC side look? Would this be exported as just a regular ObjC class? Would it be marked with an attribute as mentioned in the previous bullet point?
	Abstract classes are not exported to ObjC.

	Regards,

David

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4233 bytes
Desc: not available
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160304/1e1d8140/attachment.p7s>


More information about the swift-evolution mailing list