site_archiver@lists.apple.com Delivered-To: cocoa-dev@lists.apple.com [ [NSNotificationCenter defaultCenter] addObserver:self selector:@selector(sendCommandToSocket:) name:@"AGFIBSSendCommandToSocket" object:nil ] ; On Mar 31, 2005, at 10:19 AM, Adam wrote: Is it better to be more clear like and break things down: _______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/site_archiver%40lists.apple... I can read either of them. The first one is actually more readable to me since my mind blocks the phrase "[NSNotificationCenter defaultCenter]" together as a single entity since I'm so use to seeing it. In the second one, the only thing tying the two lines together is "nc", which I have to visually hunt for. If I were to write it, it would look like this: What is considered good cocoa style? I am sometimes tempted to be efficient and code like: [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(sendCommandToSocket:) name:@"AGFIBSSendCommandToSocket" object:nil]; NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; [nc addObserver:self selector:@selector(sendCommandToSocket:) name:@"AGFIBSSendCommandToSocket" object:nil]; This email sent to site_archiver@lists.apple.com