Does every Objective-C program convert to C code?

Since Objective-C is basically an extension of C, is the code converted to pure C code before it is compiled into native code?

If so, is the conversion to RAM or a temporary file containing C-code on disk created by the compiler, which is then compiled by the C compiler into its own code?

+7
source share
2 answers

The Objective-C syntax is an extension of the C syntax; it does not mean that it cannot have its own compiler. C ++ is the same - its syntax is compatible with C (for the most part, anyway), but has its own set of tools. Compilers for C, C ++, and Objective-C can reuse parts of each other for preprocessing, parsing, and generating code, but there is no need to run them sequentially (for example, Objective-C ==> C ==> Target Code). Compilers no longer go through a language with readable assembler (this has been the case for a very long time).

+8
source

No, Objective-C will compile directly to assembler (assuming GCC).

+4
source

All Articles