discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Objective-C without an actual compiler


From: David Chisnall
Subject: Re: Objective-C without an actual compiler
Date: Sat, 25 Oct 2014 09:51:54 +0100

On 25 Oct 2014, at 01:10, Ingwie Phoenix <ingwie2000@googlemail.com> wrote:

> I just came across an email on Clang, where they talked about how ObjC is 
> translated into C - then compiled. I just wondered if there is a 
> general-purpose tool to „convert“ ObjC code into plain C (or C++)?

This was probably talking about the clang rewriter.  It can translate 
Objective-C into C, but with two caveats:

1) The C that it generates is less efficient than the Objective-C would be with 
direct compilation and relies on some GNU extensions (so will require GCC or 
Clang to compile and won't work with the Microsoft compilers).

2) The C that it generates is specific to the Apple Objective-C runtime, so 
won't easily be compatible with GNUstep.

The tool was written as a proof-of-concept for the rewriter infrastructure in 
Clang, not for general use.  It doesn't remove the dependency on an Objective-C 
runtime.  The same infrastructure is used for things like the ARC migration 
tool (and the C++11 migration tool) and various other things.

David

-- Sent from my PDP-11




reply via email to

[Prev in Thread] Current Thread [Next in Thread]