• 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: 64-bit iOS
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 64-bit iOS


  • Subject: Re: 64-bit iOS
  • From: Marcel Weiher <email@hidden>
  • Date: Sun, 15 Sep 2013 22:02:47 +0200

On Sep 14, 2013, at 16:58 , David Duncan <email@hidden> wrote:
> On Sep 14, 2013, at 7:37 AM, vipgs99 <email@hidden> wrote:
>> So do I need replace all int to NSInteger?
>
> Technically no, but generally you do need to evaluate every usage of data types of a specific width and ensure that in 64-bit mode you won’t exceed the bounds of what an int can store.

I’d say use long or NSInteger in APIs, but in storage store only what you actually need.  The transition guide actually has one of the examples I ferreted out:  using 64 bit integers for every part of a struct representing date components. So 64 bit year, 64 bit month (range 1-12), 64 bit day (range 1-31), 64 bit hour, 64 bit minute, 64 bit second.

64 bit doubles per color component may also be overkill, by about a factor of six.

> It is more common to err on the safe side instead and simply use NSInteger instead however.

Alas, this is true.

Marcel



_______________________________________________

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: 
 >64-bit iOS (From: Scott Ribe <email@hidden>)
 >Re: 64-bit iOS (From: Fábio Bernardo <email@hidden>)
 >Re: 64-bit iOS (From: vipgs99 <email@hidden>)
 >Re: 64-bit iOS (From: David Duncan <email@hidden>)

  • Prev by Date: Core Data: Primitive Accessors & Ivar-Backed Properties
  • Next by Date: Re: 64-bit iOS
  • Previous by thread: Re: 64-bit iOS
  • Next by thread: Re: 64-bit iOS
  • Index(es):
    • Date
    • Thread