Thread overview | ||||||
---|---|---|---|---|---|---|
|
June 29, 2013 DIP43 - D/Objective-C | ||||
---|---|---|---|---|
| ||||
I have created a DIP for making D ABI compatible with Objective-C. This idea has already been announced, what I've done now is created a proper DIP. The DIP is basically Michel Fortin's original designed document properly formatted and put next to the other DIP's. DIP link: http://wiki.dlang.org/DIP43 Original announcement: http://forum.dlang.org/thread/kq7li9$2j9v$1@digitalmars.com -- /Jacob Carlborg |
June 29, 2013 Re: DIP43 - D/Objective-C | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jacob Carlborg | On 2013-06-29 12:58:45 +0000, Jacob Carlborg <doob@me.com> said: > I have created a DIP for making D ABI compatible with Objective-C. This idea has already been announced, what I've done now is created a proper DIP. The DIP is basically Michel Fortin's original designed document properly formatted and put next to the other DIP's. > > DIP link: http://wiki.dlang.org/DIP43 > Original announcement: http://forum.dlang.org/thread/kq7li9$2j9v$1@digitalmars.com There's no mention of the type of the class returned by NSObject.class. That type is NSObject.Class. Each Objective-C class has its own Class inner metaclass. Static methods are implemented behind the scene as members of this metaclass. This is already implemented. As for interfaces, they should have a "meta-interface" too implemented by the metaclasses of those classes implementing the interface. I don't think this has been done yet. -- Michel Fortin michel.fortin@michelf.ca http://michelf.ca/ |
June 29, 2013 Re: DIP43 - D/Objective-C | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jacob Carlborg | On 6/29/13 5:58 AM, Jacob Carlborg wrote: > I have created a DIP for making D ABI compatible with Objective-C. This > idea has already been announced, what I've done now is created a proper > DIP. The DIP is basically Michel Fortin's original designed document > properly formatted and put next to the other DIP's. > > DIP link: http://wiki.dlang.org/DIP43 > Original announcement: > http://forum.dlang.org/thread/kq7li9$2j9v$1@digitalmars.com It's probably an obvious observation, but why not use an annotation like: @selector("insertItemWithObjectValue:atIndex:") void insertItem(ObjcObject object, NSInteger value); instead of the DIP's proposal of: void insertItem(ObjcObject object, NSInteger value) [insertItemWithObjectValue:atIndex:]; |
June 29, 2013 Re: DIP43 - D/Objective-C | ||||
---|---|---|---|---|
| ||||
Posted in reply to David Gileadi | On 2013-06-29 15:51:11 +0000, David Gileadi <gileadis@NSPMgmail.com> said: > It's probably an obvious observation, but why not use an annotation like: > > @selector("insertItemWithObjectValue:atIndex:") > void insertItem(ObjcObject object, NSInteger value); > > instead of the DIP's proposal of: > > void insertItem(ObjcObject object, NSInteger value) [insertItemWithObjectValue:atIndex:]; This document and its experimental implementation predate UDAs. While I do like this syntax, I agree it'd make more sense to use an attribute now. -- Michel Fortin michel.fortin@michelf.ca http://michelf.ca/ |
Copyright © 1999-2021 by the D Language Foundation