On 14 Jul 2014, at 19:41, Sean McBride <s...@rogue-research.com> wrote: > On Mon, 14 Jul 2014 09:11:58 -0700, Jens Alfke said: >> But I agree about NSNumbers being more complicated. The only time you >> need to use an NSNumber is if you want to stick a number into a >> collection or otherwise need to treat it as an object. > > It's also useful for optional values, where a nil NSNumber is different from > a zero valued integer.
Still, usually I've had enough room that I could just pick a larger numeric type and define a constant like #define UKUnsetNumberOfPhoneLines LONG_LONG_MAX. Better than having to muck with NSNumbers. If only there were programming languages existed where NSNumber had built-in support and was optimized out in cases that don't need a real object ;-) Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://www.zathras.de _______________________________________________ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com