3 ms·
ObjC and C go extremely well together, more so than C++ and C. You just have to make sure platform specific stuff that is in ObjC and GUI stuff is separate, whi
by kosinus 12y ago
ObjC and C go extremely well together, more so than C++ and C. You just have to make sure platform specific stuff that is in ObjC and GUI stuff is separate, which he advocates for any way, if I understood correctly.
- mtdewcmu 12y agoI think you are right about separating the ObjC. C++ and ObjC don't play so well together, either, so if your primary language was C++, I think you'd need a plan around how to deal with ObjC.
- pjmlp 12y agoEver heard of Objective-C++? It is also supported by Objective-C compilers.
- mtdewcmu 12y agoThe problem is that C++ and ObjectiveC have overlapping purposes. The issue isn't that it's impossible to use them together. The issue is that you will have to have a strategy for dealing with conflicts before they occur.
- pjmlp 12y agoThat is true. Actually such considerations should be part of any mixed language project, specially in the presence of portable code.
- tylerneylon 12y agogcc and clang can handle mixed Objective-C and C++ in a single source file (some call it Objective-C++). The only tricky part is linking since C++ and ObjC++ use a different symbol name convention than C/ObjC; but you can still link between them by using extern "C" declarations in the right places.