Re: Why does NSArray count return NSUInteger?
Re: Why does NSArray count return NSUInteger?
- Subject: Re: Why does NSArray count return NSUInteger?
- From: "email@hidden" <email@hidden>
- Date: Mon, 30 May 2011 12:20:16 +0100
On 30 May 2011, at 12:03, julius wrote:
>
>
> So was it really just because the number of array elements is never -3 that the Cocoa developers decided to make NSArray count return type NSUInteger?
>
> Julius
>
You always need to pay close close attention to function/method return types, however we all get tripped up on such things from time to time.
In this case, in addition to the illogicality of a negative index, the usage of NSUInteger as opposed to NSInteger doubles the available index range.
Regards
Jonathan Mitchell
Developer
Mugginsoft LLP
http://www.mugginsoft.com_______________________________________________
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