• 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: What is the default type for an integer literal (as relates to its use in NSLog)?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What is the default type for an integer literal (as relates to its use in NSLog)?


  • Subject: Re: What is the default type for an integer literal (as relates to its use in NSLog)?
  • From: Nick Zitzmann <email@hidden>
  • Date: Mon, 15 Dec 2008 14:14:20 -0700


On Dec 15, 2008, at 2:06 PM, Stuart Malin wrote:

Yes, but then I lose the compile-time enforcement that only defined values are supplied (as is achieved with typedef enum). So, as you suggest, I see no reason not to leave as 32-bit. Yet Apple doesn't... is there an advantage to their approach (other than the type being unsigned)?


There is, but only if you're making a framework (or several) that has to stand the test of time. Some of the enums, particularly bit masks, may need more space in the future as new features are added to the OS, in which case having it 64-bit up front on 64-bit operating systems preserves compatibility. If you look at the NSEvent masks, it looks like they're almost there...

Nick Zitzmann
<http://www.chronosnet.com/>

_______________________________________________

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: 
 >What is the default type for an integer literal (as relates to its use in NSLog)? (From: Stuart Malin <email@hidden>)
 >Re: What is the default type for an integer literal (as relates to its use in NSLog)? (From: Nick Zitzmann <email@hidden>)
 >Re: What is the default type for an integer literal (as relates to its use in NSLog)? (From: Stuart Malin <email@hidden>)
 >Re: What is the default type for an integer literal (as relates to its use in NSLog)? (From: Nick Zitzmann <email@hidden>)
 >Re: What is the default type for an integer literal (as relates to its use in NSLog)? (From: Stuart Malin <email@hidden>)

  • Prev by Date: Re: What is the default type for an integer literal (as relates to its use in NSLog)?
  • Next by Date: NSURLConnection & NSInputStream issue
  • Previous by thread: Re: What is the default type for an integer literal (as relates to its use in NSLog)?
  • Next by thread: NSURLConnection & NSInputStream issue
  • Index(es):
    • Date
    • Thread