D/Objective-C: hit a dead end, start anew
Michel Fortin
michel.fortin at michelf.com
Fri Sep 17 07:56:23 PDT 2010
On 2010-09-17 10:06:27 -0400, Jacob Carlborg <doob at me.com> said:
> Have you thought about what needs to be modified/added yet? Is it
> basically better support for runtime reflection?
Basically I'm adding the necessary pieces so that DMD can generate
object files containing the exact same things an the Objective-C
compiler would generate. I am also adding the few necessary syntactic
additions to support this. The end result should be as efficient as the
Objective-C compiler itself.
One thing I am *not* doing is adding the alien Objective-C syntax to D.
Declaring an Objective-C class will look like this:
extern (Objective-C)
class NSObject {
NSString description() @property;
void perform(SEL selector, NSObject object) [performSelector:withObject:];
}
and for the most part should be semantically equivalent to a regular D
class. The only cases where I'm adding to the syntax are those where
special things need to be expressed, such as the Objective-C selector
when necessary for one of the two methods above.
Most of the work is being done in the glue code that links the frontend
to the backend. I'm trying to not affect the semantics of any D
construct, simply binding them to the Objective-C runtime where
appropriate.
--
Michel Fortin
michel.fortin at michelf.com
http://michelf.com/
More information about the Digitalmars-d-announce
mailing list