If Protocol method is marked @required, when not implemented, why does compiler issue a warning and not an error?

Errors are only issued when the compiler cannot continue because something went terribly wrong.

Errors are only issued when the compiler cannot continue because something went terribly wrong. When calling a method in Objective-C, the method lookup is done during runtime and not during compilation, which C++ does. In Objective-C a "message" is simply sent to the object, something like obj.

ExecuteCommand(" can you execute function for me? "). In C++ the object will be called directly, in a way like obj.().

In the case of Objective-C the executeCommand() method is called, which exists. In C++'s case the function is called but it does not exist. These are methods that are linked on the compiler level, which means they both become memory addresses rather than names.

ExecuteCommand becomes 0x12345678 but it still uses the same message ("execute function "). This is probably very confusing, but it's related to the way methods are implemented in different languages.

I don't know the real answer but here is a use case that would go against it. What if you implemented all of the protocol methods in a category? Main interface declaration adopts the protocol however the protocol method implementation is in a category.

This is valid code but will show compile error if compiler was that strict!

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions