RE: 3 obj-c/cocoa beginner q's
RE: 3 obj-c/cocoa beginner q's
- Subject: RE: 3 obj-c/cocoa beginner q's
- From: "Mondragon, Ian" <email@hidden>
- Date: Tue, 25 Mar 2003 12:03:41 -0600
personally, i almost always loop over arrays in the standard way:
---
int count, i;
count = [array count];
for (i = 0; i < count; i++)
{
// whatever
}
---
i found out long ago that, while they're nice, NSEnumerators can kill the
performance of programs when abused...and they're horrible to use when
you're using nested loops in the same types of programs.
just my 2 cents...
- ian
>
-----Original Message-----
>
From: Finlay Dobbie [SMTP:email@hidden]
>
Sent: Tuesday, March 25, 2003 10:32 AM
>
To: Ben Dougall
>
Cc: Cocoa Dev
>
Subject: Re: 3 obj-c/cocoa beginner q's
>
>
On Tuesday, March 25, 2003, at 03:59 pm, Ben Dougall wrote:
>
>
>> for(int i([myArray count] - 1); i >= 0; --i)
>
>> {
>
>> ...
>
>> }
>
>
>
> oh yeah that's good - doesn't even use the extra variable. thanks.
>
>
Yes it does. Look again at the initialisation statement.
>
>
-- Finlay
>
_______________________________________________
>
cocoa-dev mailing list | email@hidden
>
Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
>
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.