On Dec 13, 2008, at 7:40 PM, Mike Schrag wrote:

OK -- So what's the official reason why you aren't allowed to put a nil into an Objective-C NSArray? It seems like a pretty silly restriction to me ...

Mike - I asked Steve Naroff for you...

On Dec 15, 2008, at 10:00 AM, steve naroff wrote:

On Dec 13, 2008, at 7:52 PM, Alex Horovitz wrote:
Thoughts?


Here's Ali Ozer's perspective...

If you allow nils in collections, then you can't tell from calls such as objectForKey: or objectEqualToObject: whether the nil return indicates failure or a hit on nil. So you have to have another sentinel, which is what the lower level APIs (NSHashTable, NSMapTable) do, with the added complexity in API of course.

Sounds like the kit folks chose to keep the API simpler (at the cost of not allowing 'nil'). Not super compelling, but a design made a long time ago...

snaroff


-A

Alex
~~~~~~~~~~~~~~~~~~~~~~
Alex Horovitz
Chief Technology Officer
The Brookeside Group, Inc.

524 Main Street
Acton, MA 01720
(o) 978.266.9876 x225
(c) 978.808.0808
(f) 978.266.1555
ahorov...@brookeside.com
www.brookeside.com

The Brookeside Group, Inc. - Loyalty MattersTM.

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to