Re: [ANN] Cocoa Style for ObjC: 1 and 2
Re: [ANN] Cocoa Style for ObjC: 1 and 2
- Subject: Re: [ANN] Cocoa Style for ObjC: 1 and 2
- From: The Amazing Llama <email@hidden>
- Date: Wed, 27 Oct 2004 13:00:19 -0700
On Oct 26, 2004, at 5:40 PM, Scott Stevenson wrote:
I would argue against this because "each" (in English context, anyway)
isn't free-standing. It has an implicit relationship with the many. In
other words, this looks weird to me:
[array addObject: eachName];
It reads as "add each name to the array" which isn't what it's doing.
This is very AppleScript-y, and it makes sense there, because you ARE
in fact adding eachName to the array. For instance
repeat with eachName in someList
add eachName to theArray
end repeat
That makes perfect sense, even if it's not actually very helpful here.
I would argue that the equivalent ObjC makes just as much sense.
However....
Maybe even "currentName" would be better, as it would say "add the
current name to the array":
[array addObject: currentName];
I usually do this instead, because it "expands" easier. After you
define "current" it is relatively simple to add in a "previous" and a
"next", if need be, but you can't really do so with "each" or "one".
Seth A. Roby The Amazing Llama < mail or AIM me at tallama at mac dot
com>
"Life is like an exploded clown. It's really funny until you figure out
what just happened."
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden