My understanding of the Objective-C id type is that it’s a pointer to an object of unknown type. In my eyes it’s like a void* for Objective-C classes with some compiler sugar on top for stuff like type checking. My question is why is it not id* instead of id then since it is a pointer type? If this were Java or C# where object references aren’t declared using an * then I wouldn’t be so surprised. But in Objective-C, every class is referenced by C-style pointers, so why hide the * for the unknown object type?
My understanding of the Objective-C id type is that it’s a pointer to an
Share
The
id typedefis already a pointer:From the Objective-C Programming Language: