|
|
|
|
|
by gukjoon
5192 days ago
|
|
This is awesome, but what gives me pause is the part where you have to write a foreign function interface for every single Carbon API call. Also, I would assume that Cocoa is completely unavailable when going to C. Is that correct? I'm very happy to see the multi-platform vision of Clojure becoming closer to reality. I'm not in the "write once, run everywhere" camp. That goal is a bit ridiculous, but the choice of VM and the choice of language should be independent decisions. I like Erlang's VM a lot, but the language itself is not very nice. When writing iPhone code, I don't want to be forced to use Objective C. |
|
If not, usually it's not too difficult to only wrap the calls that you need. There are also methods for automatically generating FFIs, although that only works with certain APIs.
Cocoa is definitely accessible from C. Objective-C is just a superset of C, so if you compile all the generated C files as Obj-C you can write any Cocoa code you want.