Tag Archives: objective-c

Differences between Java interfaces and Objective-C protocols?

Questions: I know Java, and now I’m learning Objective-C. What exactly are the differences between Java interfaces and Objective-C protocols? Answers: First off, a little historical perspective on the topic, from one of the creators of Java. Next, Wikipedia has a moderately helpful section on Objective-C protocols. In particular, understand that Objective-C supports both formal… Read More »

Objective-C Default Argument Value

Questions: Hey there, quick question here. I’m sure there’s a simple answer. Coming from PHP, I’m used to declaring a function with a default argument value like this: function myFunction ($array, $sort = FALSE) { } I the sort parameter wasn’t filled, the function would continue with the default value of false. In Obj-C, is… Read More »