Re: Why does NSArray count return NSUInteger?
Re: Why does NSArray count return NSUInteger?
- Subject: Re: Why does NSArray count return NSUInteger?
- From: julius <email@hidden>
- Date: Mon, 30 May 2011 16:27:42 +0100
On 30 May 2011, at 16:02, Graham Cox wrote:
>
> On 31/05/2011, at 12:03 AM, julius wrote:
>
>> has the potential to create problems if it skips one's mind
>
> Well, so does almost anything in life. Coding's no different.
>
>> Of course I find decision to have NSArray count return NSUInteger somewhat curious precisely because it seems to me liable to lead to subtle errors in cases where programmers might have forgotten that NSArray count returns etc. etc.
>
> Designers can't be expected to anticipate and compensate for your bad memory.
Well actually I disagree.
I think human factors are very important especially in situations where the tools in question need to facilitate clear expression of complex problems and reduce the risk of untoward errors.
> The documentation states clearly what's what. It's up to you to take that on board. "Forgetting" is not a good reason to design something differently.
Yes but again human factors come into play.
>
>
> ...and write the rest of your code correctly. I'm not actually sure what you're trying to do with it.
What I am trying to do with my code is irrelevant to the question I asked as is also the issue of whether or not I write good code.
>
>> I think the use of NSUInteger in this context is misguided.
>
> So file bugs against it. Good luck with that. I doubt you'll get much support from many programmers on this list however.
No. I am not going to do that.
All I had hoped was that someone on this list might illuminate the issue more than has happened so far.
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