Forgive the horrible title. I’ve just read one paragraph in the Apple document entitled “The Objective-C Programming Language” which explains how dynamic message binding, as implemented by the Objective-C runtime, is the seat of it’s power and versatility. Here’s that paragraph:
When a message is sent, a runtime messaging routine looks at the receiver and at the method named in the message. It locates the receiver’s implementation of a method matching the name, “calls” the method, and passes it a pointer to the receiver’s instance variables.
When you understand the consequences of this small paragraph and how it makes iOS messaging utterly different to static method binding, you’ll be well on your way to iOS enlightenment 😉
Advertisements