site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com El 12/07/2005, a las 6:08, Mike Smith escribió: 1. Single method with special value used to indicate "any user": - (void)doSomethingWithUser:(long long)uid; - (void)doSomething; - (void)doSomethingWithUser:(uid_t)uid; 3. Single method with additional argument: - (void)doSomething:(uid_t)uid anyUser:(BOOL)flag; - (void)doSomethingWithUser:(uid_t *)uid; Cheers, Greg _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... Is there any reason that you can't simply pass another argument? No, no reason. That's another option that I forgot to list. I was just trying to come up with the "cleanest" API with minimal code duplication, but "clean" is always going to be a bit subjective: 2. Separate methods, one for "any user" and another for a specified user: 4. Single method with uid passed by reference, passing NULL pointer for "any user": There are probably some other options too but I don't want to get carried away listing them. For me stylistic questions often come up like this when mixing higher-level code (written in Objective-C) with lower-level APIs... When I first approached the problem, the first style seemed the right way to do it, but now I am not so sure. This email sent to site_archiver@lists.apple.com