• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Can an NSArray ever have a count of -1?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Can an NSArray ever have a count of -1? (From: Jim Adams <email@hidden>)
 >Re: Can an NSArray ever have a count of -1? (From: Jens Alfke <email@hidden>)
 >Re: Can an NSArray ever have a count of -1? (From: Jean-Daniel Dupas <email@hidden>)
 >Re: Can an NSArray ever have a count of -1? (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: Can an NSArray ever have a count of -1?
  • Next by Date: Re: Can an NSArray ever have a count of -1?
  • Previous by thread: Re: Can an NSArray ever have a count of -1?
  • Next by thread: Re: Can an NSArray ever have a count of -1?
  • Index(es):
    • Date
    • Thread