When doing objective-c, do I have to write out functions like:
- (int) someFunction: (int) a someParam: (int) b;
Or can I use regular C style:
void someFunction(int a, int b);
If I can do the C style, is there any benefit to doing it in the Objective-C style?
You can use regular C functions, if you like, since Objective-C is just a super set of C.
You need to use Objective-C syntax if you want to use Objective-C features, like classes, messages, inheritance, etc… and of course to use the Cocoa/CocoaTouch SDK.
You can mix Objective-C and C code in your files, and have an Objective-C method call out to a pure C function. You can also call an Objective-C method from a pure C function by accessing directly the Objective-C runtime layer (e.g., using the
objc_msgSendfunction).