On Tuesday, 5 January 2016 at 16:10:38 UTC, Walter Bright wrote:
On 1/5/2016 3:21 AM, Ola Fosheim Grøstad wrote:
Nope. Objective-C++ has full C++ support.
It's the other way around. O-C++ is a C++ compiler that
supports O-C extensions.
The difference is marginal. C++ on clang support C99 extensions
to C++, like VLA (which I use quite frequently).
This is amply illustrated by Swift's total lack of C++
interoperability.
Actually, I think that is completely unrelated. Swift is a
separate language that has been designed to work well with Cocoa
rather than plain C IMO.
Swift has a Objective-C/C++ compatible runtime, and _bridging_ to
CoreFoundation (Apple's C allocated objects) just like
Objective-C/C++. For non-CoreFoundation objects the situation is
more troubled AFAIK.
So to have good interfacing with Apple tech, you need Foundation
or CoreFoundation objects... Not C++, C or D objects...
I rarely deal with bridging, did I get this right?