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 (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

Reply via email to