Tuesday, July 17, 2012

Xcode and AppCode

Andrew Pontious:

Much of the reason Xcode used to be so bad was that it couldn’t link against gcc directly. Clang is now deeply integrated into Xcode, including its index and its code editor. Does AppCode have to do double the work to get the same result? Or does it try to parse the source code in its own, not-quite-matching way, leading to weird inconsistencies? Will builds be as fast? Will there be cryptic errors when I try something nobody thought of to integrate properly? Can I really trust it to edit project and workspace files (whose formats are undocumented)?

Presumably this restriction was due to gcc being GPL code and Apple not wanting to open-source its IDE.

2 Comments RSS · Twitter

Jean-Daniel

No, this restriction exists due to GCC design. GCC is a single monolithic binary that cannot be reused in any way to do something useful but compile some source code. Not a single OpenSource IDE uses GCC parser to index code or perform syntax highlighting. Even GDB has to write an maintained it's own C and C++ expression parser.

@Jean-Daniel Thanks for reminding me of that. People were noting this when Mac OS X was new, but I kept hearing how GCC was too big and complicated to replace, so we were stuck with it. The LLVM/Clang folks have done some great work.

Leave a Comment