2 ms·
Using another language as your target (such as an Objective-C compiler outputting C, or Stroustrup's original C++ implementation, Cfront, outputtting C) guarant
by scott_s 18y ago
Using another language as your target (such as an Objective-C compiler outputting C, or Stroustrup's original C++ implementation, Cfront, outputtting C) guarantees no relationship to the target language. If Objective-C is a strict superset of C (which I have no knowledge of), it is not because C was the target language.
Also, it's not accurate to call something a "preprocessor" just because its target language is a subset of the language it supports. It's a compiler - a source-to-source compiler, yes, but still a compiler.
- DLWormwood 18y ago> It's a compiler - a source-to-source compiler, yes, but still a compiler. This was kind of my original point. The very first version wasn't a compiler, just a collection of pre-processor macros. I didn't have the opportunity to work with the language back when the bracket syntax was still macro'ed, but there were still some design warts in ObjC when I started before gcc was modified to support more modern, Java-like extensions to the language.... (I've written code that used the macro based NS_DURING/NS_HANDLER/NS_ENDHANLDER instead of the modern compiled @try/@catch/@finally version.)