On Tuesday, 11 March 2014 at 18:23:08 UTC, Jacob Carlborg wrote:
I just wanted to let everyone know that I have implemented
D/Objective-C for 64bit. Everything that worked for 32bit
should work, except for exceptions, which are not implemented
Objective-C on 64bit uses the modern runtime, which is also the
same used on iOS. This means D/Objective-C should now be
compatible with iOS as well, at least in theory.
For those how don't know what D/Objective-C is. It is a
language extension to D making it ABI compatible with
Objective-C. This means it's possible to use Objective-C
classes, methods, protocols (interfaces) and so on, directly
just as it's currently possible to do with regular C functions.
Here's a recap of what's implemented, both for 32 and 64bit
unless otherwise noticed:
* Instance and class methods
* Protocols (interfaces)
* Exceptions (only 32bit)
* Class references
* String literals
Some improvements that are really not part of Objective-C but
are very convenient to have in D :
* Inheriting selectors
* Automatically generated selectors
On the other hand, here a list of what's not implemented yet:
* Blocks (similar to delegates)
* Categories (class extensions)
* Any form of automatic memory management
* Exceptions (64bit)
* Vtable optimization (64bit)
Objective-C exceptions on 64bit is implemented using the same
mechanism as C++. I'm wondering if it would be possible for D
(not just for this extension) to adapt this mechanism as well.
This would make D compatible with both C++ and Objective-C
exceptions on 64bit.
A DIP is available here  and the latest implementation is
available here .
It's really awesome. Congratulations! If this DIP is actually
approved will dmd have "native" integration/support to
Objective-C language just like we can do with C? I'm not a Obj-C
programmer but I like the idea. We could still improve this add