• 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: julius <email@hidden>
  • Date: Mon, 30 May 2011 21:45:29 +0100

On 30 May 2011, at 16:40, Roland King wrote:

>
> On 30-May-2011, at 11:05 PM, julius wrote:
>
>>
>> On 30 May 2011, at 15:52,  Roland King <email@hidden> wrote
>>>
>>> On 30-May-2011, at 9:18 PM, julius wrote:
>>>
>>>>
>>>>> They used the datatype which maps onto the thing they are describing, array elements are non-negative integers, so they used NSUInteger.
>>>> So are you saying that the designers made this decision solely because of a particular interpretation of dogma?
>>>
>>> No. I am saying that semantically the 'size' of an array is a non-negative integer and thus the correct way to represent it is with a data type which represents non-negative integers.
>>
>> If that were all there was to it then I might agree but I don't think it is.
>> I think issues of program language complexity and the propensity of language constructs to induce coding errors are more important.
>>
>> Julius
>>
>
> Whist seeing your side, I respectfully disagree. I think data types should as closely as possible align with the data they actually represent.


But why do you think this requirement should trump all others and in all cases?



Julius




http://juliuspaintings.co.uk



_______________________________________________

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

References: 
 >Re: Why does NSArray count return NSUInteger? (From: Roland King <email@hidden>)

  • Prev by Date: Re: Re: Linearly Scaling Text
  • Next by Date: Re: Why does NSArray count return NSUInteger?
  • Previous by thread: Re: Why does NSArray count return NSUInteger?
  • Next by thread: Re: Why does NSArray count return NSUInteger?
  • Index(es):
    • Date
    • Thread