gwynne/MAKVONotificationCenter — comment on commit 9db3c4de967796470fc5e043e4642a2973757d47
File: MAKVONotificationCenter.h line 52
By mikeash:

This seriously confused me, to the point where it took me a while to even realize I was thinking about it wrong. I thought that any object conforming to MAKVOKeyPath would be able to be a key path, which is to say, you could pass `@"foo.bar.baz"` or `ARRAY(@"foo", @"bar", @"baz")`. But now I see, assuming that I'm understanding it correctly, that key paths are always considered to be period-separated strings, and passing in a collection just makes an observation for all of the key paths contained within the collection. If that's so, then I think this protocol's name needs to change (not entirely sure to what, but maybe something like `MAKVOKeyPaths` or `MAKVOKeyPathSet`) and the comment also needs to change to better indicate the semantics.

Additionally, given that the returned object is only ever used in `for` loops, how about making this return `id ` instead? This would allow greater flexibility in the implementation of this method without any downsides (that I can see), and would make the implementation of this method on the various non-`NSSet` objects simpler, since they could all just return `self`.