On Nov 20, 2008, at 6:58 AM, Austin Ziegler wrote:

result = [calc addDoubleA:a withDoubleB:b]; // #1

Why not -addDouble:withDouble: ?

That is, why are you promoting the argument names into the method signature? Especially since you're aware that the names are (most often) useless.

result = [calc addDoubleA:a withDoubleB:b status:&status]; // #2
status = [calc addDoubleA:a withDoubleB:b returning:&result]; // #3

These forms might also make sense, but I'd still leave out the 'A' and 'B'. I believe that Apple's naming conventions suggest that, when a method outputs multiple values, they should all be output parameters and none should be via return value. Also, Apple has been migrating towards using NSError objects output via parameter to handle status. So, you might want to do the same.

http://developer.apple.com/documentation/Cocoa/Conceptual/CodingGuidelines/Articles/NamingMethods.html

Cheers,
Ken

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to