If you look at the semantics of JavaScript and many other OO languages โโ(possibly including PHP, but I'm not sure and don't want to guess), you will see that these languages โโoffer the same indirect Objective-C target with pointers, In fact, internally these languages โโuse pointers everywhere. Consider this snippet (JavaScript):
function f(obj) { obj.x = 1;
This is roughly equivalent (C, since I don't know Objective-C), something like this, modulo manual memory management, static typing, etc.:
struct Obj { int x; }; void f(struct Obj *obj) { obj->x = 1; obj = ...;
It is just explicit in Objective-C, because this language is a superset of C (100% backward compatibility and interoperability), while other languages โโdo away with explicit pointers and make an indirect relation implicit to them.
source share