>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 (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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com