3 ms·
The linked project doesn't use any ObjC files at all. SDL2 has a bunch of Cocoa files[1] so you did use Cocoa even if unknowingly. [1] https://github.com/libsd
by speps 2y ago
The linked project doesn't use any ObjC files at all. SDL2 has a bunch of Cocoa files[1] so you did use Cocoa even if unknowingly.
[1] https://github.com/libsdl-org/SDL/tree/main/src/video/cocoa https://github.com/libsdl-org/SDL/tree/main/src/video/cocoa
- LeoNatan25 2y agoThe linked project also uses Cocoa, and guess what, considering Cocoa itself is written in ObjC, the linked project also uses OBjC “unknowingly”. Considering CodaFi works for Apple now, he knows. Spoiler: he knew 11 years ago too.
- anamexis 2y agoThe OP says it is Cocoa-less in the readme, is that not true?
- electroly 2y agoIt's not. Open up any of the .c files and you'll see lots of references to Cocoa. One of the comments refers to Cocoa by name! This is using objc_msgSend to call into Cocoa. You'd have to squint your eyes pretty hard for the claim in the readme to be true. What it doesn't have is Objective-C code, which is different than not having Cocoa.
- cancerhacker 2y agocheck out the clang objc rewriter - basically c++front for objc. https://www.jviotti.com/2023/12/01/understanding-objective-c-by-transpiling-it-to-cpp.html https://www.jviotti.com/2023/12/01/understanding-objective-c...
- astrange 2y agoDoesn't work anymore, especially because it doesn't support ARC.
- JKCalhoun 2y agoYeah, that's okay. It wasn't like a "purity thing" for me, just nice to write portable code.