Objective-C through a preprocessor

Question

Can Objective-C be implemented by translating it into C?

Answer

The concise answer is yes, in fact contemporary Objective-C implementations, as provided by for instance Stepstone and BPG, actually translate Objective-C to C which in turn is processed by the C compiler already present on the system. However, one must not forget that (most of) the power of Objective-C is provided by the Objective-C runtime library, which has nothing to do with the Objective-C compiler other than that the compiler generates code which calls the library.

A program translating Objective-C to C needs to perform the following actions:

An existing, available Objective-C Translator is OCT though a quick glance shows it seems both rather Amiga oriented and old (i.e. there is no ./configure, me spoiled brat).


Question by mitzel@ionet.net. Answer based on remarks by Gregory H. Anderson, Jeremy Bettis, Don Yacktman, Christopher Rath and Bill Bereza. Mail your comments on this page to tiggr@ics.ele.tue.nl.
Up: Infrequently Asked Questions concerning Objective-C
Next: Reference counting in FoundationKit
Copyright (C) 1995, 1996 Pieter J. Schoenmakers. All rights reserved.
tiggr@ics.ele.tue.nl