I think it's easier to place a NULL than having to keep track of the number of 
args. None of them is foolproof, but placing NULL is all it takes to make it 
work. One could plug the wrong number of args and boum! Forcing to keep the 
number in sync is an extra step.

-- Tito

On Jul 4, 2012, at 5:40 PM, Charles Srstka <cocoa...@charlessoft.com> wrote:

> On Jul 4, 2012, at 7:34 PM, Tito Ciuro wrote:
> 
>> It makes total sense now. Out of the two options (NULL sentinel vs a number 
>> to indicate the number of args), I would choose NULL because out of the two, 
>> it's more foolproof. Is there a consensus about which option is considered 
>> best practice?
> 
> Neither method is much foolproof at all — both of them can easily be 
> undermined by even low-level fools. However, using a NULL sentinel is what is 
> more commonly done.
> 
> Charles
> 

_______________________________________________

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to