• 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: Why does NSArray count return NSUInteger?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why does NSArray count return NSUInteger?


  • Subject: Re: Why does NSArray count return NSUInteger?
  • From: Lee Ann Rucker <email@hidden>
  • Date: Mon, 30 May 2011 18:21:12 -0700 (PDT)

>Unfortunately, somebody decided a long time ago, the same can't be done for integers, because there's no infinite-range numerical space available to machine computation (in any way that mainstream hardware supports directly), and no single finite-range space that (as in the floating point case) encompasses the others.


Smalltalk integers appeared to all be of the same Integer class, but behind the scenes they'd switch from primitive smallints to objects once they hit the smallint max (29 bits in 32-bit address space). But unless you were inside the virtual machine you couldn't tell objects from primitives anyway - every single thing you dealt with was an object.

But in a hybrid like ObjC, we sometimes have to play by C rules.
_______________________________________________

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: 
 >Re: Why does NSArray count return NSUInteger? (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: Why does NSArray count return NSUInteger?
  • Next by Date: Re: Linearly Scaling Text
  • Previous by thread: Re: Why does NSArray count return NSUInteger?
  • Next by thread: Re: Why does NSArray count return NSUInteger?
  • Index(es):
    • Date
    • Thread