Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Not very practical, if you need to use a lot of APIs. One of advantage of Objective C is that it's easy to interop with C.


If you need to use a lot of APIs, why not rename your source code file from .c to .m and just call them with ObjC syntax then?


You are seeing the other way around.

That advantage is to migrate C code into Objective-C, just like C++ and TypeScript have done as well.

In fact, NeXTSTEP and its derived OSes have very little pure C code, beyond BSD/XNU kernel and the POSIX APIs.


You'd be surprised. The new APFS.Framework appears to be all C for instance.


Even then you're supposed to actually use the higher level filesystem framework APIs from Objective-C and Swift.

https://developer.apple.com/documentation/foundation/file_sy...


I mean, yeah, you're not "supposed to" use it; it's a private framework. Also, the only reason why someone like me would know if it's in C or not is that I need one of the aspects of that library that can't be expressed in the high level APIs.

My point is that there's tons of non legacy C code, in the OS outside of the kernel and posix subsystems on *OS.


CoreFoundation?


The migration framework from Mac OS into OS X.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: