Objective-C variadic methods vs. NSArray et al.
Objective-C variadic methods vs. NSArray et al.
- Subject: Objective-C variadic methods vs. NSArray et al.
- From: Scott Thompson <email@hidden>
- Date: Fri, 21 Nov 2008 17:40:29 -0600
Technical QA 1405 concerns the creation of Objective-C methods that
take variable number of arguments... so called variadic methods.
Happily the mechanisms just use the standard C mechanisms (va_start
and friends).
That being the case, why is it that methods like arrayWithObjects:
require you to nil terminate the list of arguments? Is it simply
tradition, or some kind of optimization?
I don't need to know... I'm just curious.
Scott
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden