[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: collections of primitive types
From: |
Richard Frith-Macdonald |
Subject: |
Re: collections of primitive types |
Date: |
Fri, 28 Feb 2003 21:40:18 +0000 |
On Friday, February 28, 2003, at 06:26 pm, Travis Griggs wrote:
It looks like I'll have to do my own high res time object,
I'd use NSDate ... resolution is as the system clock will allow...
Notionally that's to the microsecond under linux.
I'm not sure what the point would be in having higher resolution.
NSArray looks fine for storing objects. But quite often I want an
array of floats or ints. What's the general approach? Do I box up the
primitive numbers in objects and use NSArray? Is there a FloatArray or
IntArray thing? Write my own?
Generally you use NSNumber objects.
And why can't NSArray hold nil's? I thought nil was an object in
Objective-C and that you could send messages to it.
nil is not an object .... but the NSNull class provides an object you
can use as a placeholder.