Firs step of D/Objective-C merged

Michel Fortin via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Mon Jul 13 18:11:09 PDT 2015


On 2015-07-13 14:02:54 +0000, Steven Schveighoffer <schveiguy at yahoo.com> said:

> I wanted to ask, swift can call into objective-C, so does this de-facto 
> give us a D/swift binding as well? I haven't written a single line of 
> swift yet, so apologies if this is a stupid question.

More or less. If you define an `extern (Objective-C)` class in D (once 
all my work is merged), you can use it and derive from it in Swift. If 
you define an `@objc` class in Swift you can use it from Objective-C 
and from D, but you can't derive from it.

Note that the Swift ABI isn't stable yet. So the above might change at 
some point.

-- 
Michel Fortin
michel.fortin at michelf.ca
http://michelf.ca



More information about the Digitalmars-d-announce mailing list