There are multiple examples of @private instance variables all over the Foundation, UIKit and other framework headers. Here are some examples:
//CLLocationManager.h
@interface CLLocationManager : NSObject
{
@private
id _internal;
}
<...>
//NSAutoreleasePool.h
@interface NSAutoreleasePool : NSObject {
@private
void *_token;
void *_reserved3;
void *_reserved2;
void *_reserved;
}
<...>
etc.
These instance variables are @private, so it's not possible to access them from anywhere except the class itself. What is the point of exposing them in the headers?
So why not
//CLLocationManager.m
@interface CLLocationManager<>
{
id _internal;
}
Or even, considering modern Objective-C syntax:
//CLLocationManager.m
@interface CLLocationManager<>
@property(nonatomic, assign) id internal;
Why did apple used private instance variables in headers, exposing the internals of the class instead of hiding them in the implementation?