3 ms·
Reading chapter 7 it's quite easy to understand that Objective-C once started as a preprocessor for C.
by wsc981 12y ago
Reading chapter 7 it's quite easy to understand that Objective-C once started as a preprocessor for C.
- andyjohnson0 12y agoThat's also how C++ started. The original C++ compiler, cfront [1], converted C++ source to C source which it then passed to cc. [1] http://en.wikipedia.org/wiki/Cfront http://en.wikipedia.org/wiki/Cfront
- pjmlp 12y agoIt is also how COM works. You have a struct that exposes function pointers, which happen to map 1:1 to how C++ compilers create their vtables in Windows. Incidentally how MSVC++ handles vtables, but other vendors need to be compatible with COM, so they follow along.