5 ms·
If you just need C instead of C++ then .m suffices, ojective-c is a strict superset of C.
by krackers 2y ago
If you just need C instead of C++ then .m suffices, ojective-c is a strict superset of C.
- larusso 2y agoIt‘s a superset of ANSI-C. One needs to be carful to mention this. I‘m not aware that this had changed and also added some small grieve back in the days for me. But I sadly can‘t remember anymore what didn‘t work for me.
- krackers 2y agoI'd be curious if you can remember what differences there were. It's compatible with all C99 and C11 syntax I've tried
- larusso 2y agoI think it was specifically in .m files. Obj-c is using ANSI-C (c89) which lacks certain features and keywords. Mixing with c99 files is of course possible. Maybe that was also an issue in older versions of clang.