Possible Duplicate:
What is this double underscore in Cocoa
I’ve seen a variety of Core Data code examples that use two underscores instead of one. I am aware of the advantages of iVars and using _variableName…But is there a particular reason/advantage for using two instead of one? such as __fetchedResultsController = …
There are no real reasons to use a double underscore.
I will say that I’m not a fan of them though, because some things in Objective-C use them, such as:
__blockor__unsafe_unretainedWhen I see the
__, I tend to think of it firstly as a decorator that Apple has defined. If anything, it adds an extra second of thought to it, whereas the single underscore is universally understood to be a class’ iVar.I’d suggest just using
_.From the accepted answer to “What is this double underscore in Cocoa?”:
A summary of the ANSI C standard says: