Wednesday, April 11, 2012

Is Objective-C converted to C code before compilation?

I know objective C is strict superset of C and we are writing the same thing.
But when i write
@interface Myintf {} @end
Does it get converted to a C struct or is it that the memory layout for the data structure Myintf prepared by Objective c compiler is same as that of a C struct defined in runtime.h?

and same question about objc_msgsend

Apple document says

In Objective-C, messages aren't bound to method implementations until runtime. The compiler converts a message expression,
into a call on a messaging function, objc_msgSend.
This function takes the receiver and the name of the method mentioned in the message—that is, the method selector—as its two principal parameters:

No comments:

Post a Comment