Re: Can an NSArray ever have a count of -1?
Re: Can an NSArray ever have a count of -1?
- Subject: Re: Can an NSArray ever have a count of -1?
- From: Sean McBride <email@hidden>
- Date: Fri, 19 Feb 2016 18:08:29 -0500
- Organization: Rogue Research Inc.
On Fri, 19 Feb 2016 14:29:03 -0800, Jens Alfke said:
>(Here’s one reason NSInteger sucks: the difference in sizes doesn’t make
>sense for values that don’t refer to memory sizes. For example, is it OK
>use NSUInteger to store a file size? In a 64-bit process, sure! In a 32-
>bit one, you’ll be fine until you encounter a file > 4GB long, then you
>overflow and get the size wrong.
Which is why API that deal with file sizes don't use NSUInteger. It doesn't mean NSInteger sucks, it's just a 'right tool for right job' kind of thing.
Cheers,
--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
_______________________________________________
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