When to call a reference property “delegate”?-Collection of common programming errors
I know what delegation is and how it works but for me parentController is a more meaningful name. delegate, that could just be anything.
I think you’ve answered your own question here. A delegate is a helper object that “could just be anything” as far as the delegating class is concerned. The name parentController assumes something specific about the relationship between the two objects. If you know that that relationship will always exist, then it’s appropriate to use that name. On the other hand, if the two objects only happen to have that relationship, but the relationship isn’t important to the fact that one object is using the other as a helper, then use delegate (or something similar).
So, is it necessary that the objects in question have a parent/child relationship? Are you sending messages to parentViewController specifically because it’s the parent? Or is it conceivable that some other object could respond to the same messages?