Thoughts about a bit more formal approach to indexed/keyed subscripting
@protocol ADVIndexedSubscripting <NSObject>
- (id) objectAtIndexedSubscript:(NSUInteger)index;
@end
@protocol ADVMutableIndexedSubscripting <ADVIndexedSubscripting>
- (void) setObject:(id)object atIndexedSubscript:(NSUInteger)index;
@end
@protocol ADVKeyedSubscripting <NSObject>
- (id) objectForKeyedSubscript:(id)key;
@end
@protocol ADVMutableKeySubscripting <ADVKeyedSubscripting>
- (void) setObject:(id)object forKeyedSubscript:(id <NSCopying>)key;
@end