• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Why does NSArray count return NSUInteger?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why does NSArray count return NSUInteger?


  • Subject: Re: Why does NSArray count return NSUInteger?
  • From: Greg Guerin <email@hidden>
  • Date: Mon, 30 May 2011 15:57:01 -0700

julius wrote:

My question is
Why did Cocoa developers make NSArray count return NSUInteger?


It's impossible to answer with certainty. The person or persons who made that decision are not on this list (AFAIK). Nor have they documented the rationale behind their design decisions for posterity.

Several hypotheses have been proposed. The simplest one is that the returned type is consistent with the parameter types of all the other methods that have an index parameter.

You have countered with reasons why the various hypotheses are not compelling (in your opinion). Others have countered with reasons why your reasons are not compelling (in their opinion). Your taste is not theirs, nor is theirs yours.

In a practical sense, none of this matters. The decision was made long, long ago. It is what it is. You're too late to save that sheep from drowning.

  -- GG

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Why does NSArray count return NSUInteger?
      • From: Andy Lee <email@hidden>
    • Re: Why does NSArray count return NSUInteger?
      • From: Graham Cox <email@hidden>
  • Prev by Date: Re: Why does NSArray count return NSUInteger?
  • Next by Date: Re: Linearly Scaling Text
  • Previous by thread: Re: Why does NSArray count return NSUInteger?
  • Next by thread: Re: Why does NSArray count return NSUInteger?
  • Index(es):
    • Date
    • Thread