On Apr 9, 2008, at 9:30 AM, Corbin Dunn wrote:

On Apr 8, 2008, at 5:30 PM, Timothy Reaves wrote:

What advantage does NSUinteger have over uint32? I realize that on a 64 bit machine, it would be a uint64.

I think everyone is missing the point. The advantage is not "None".

I didn't mean to say that NS[U]Integer has no point, but rather that it doesn't make sense to say that it has an "advantage" (or not) over uint32_t, because they mean different things. If what you want is a machine-sized integer, then NSInteger has some very clear advantages over the alternative (lots of ifdefs). However, if what you want is specifically a 32-bit integer, then NSInteger would just be wrong. I'd venture that most uses are in the former camp, not the latter, but it deserves at least a little thought.

As for the question of "NSInteger" versus "long", I've had to work on enough different architectures that I consider there to be an implicit advantage in a typedef (NSInteger) over a bare "long", but that's me.


--Chris Nebel
_______________________________________________

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 [EMAIL PROTECTED]

Reply via email to