Re: ever felt like a complete BOZO??
Re: ever felt like a complete BOZO??
- Subject: Re: ever felt like a complete BOZO??
- From: "David W. Halliday" <email@hidden>
- Date: Fri, 12 Apr 2002 11:50:35 -0500
- Organization: TNRCC
Angela Brett wrote:
>
> ...
>
>well ... I got so many great replies so far that I am feeling already
>
>way better ... THAT is the cool thing about Apple-People - they simply
>
>love what they do ...
>
>
>
...
>
Objective-C's argument labels (if that's what they're called) makes
>
Cocoa code so much easier to understand. Mind you, it could just be
>
because I've written it myself!
>
>
...
>
--
>
Angela Brett ...
I've noticed many others that seem to think that the parts of Objective-C method
names are "argument labels" or "type labels", or some such. The reality is that
they need have nothing to do with the arguments or their types, they are simply part
of the method identifier.
However, that being the case, it tends to be wise practice to choose the various
parts of the method identifier so the result of writing a method pass/call is
something akin to a sentence of phase: So the result is readable in a more-or-less
natural way. This also, often, produces code that is more-or-less self documenting
(since the resulting sentence or phrase helps describe what is happening).
Incidentally, this was borrowed from SmallTalk's ability to have method names
that are, just about, any collection of strings (it even allowed method "names" like
'+', so 5 + 6 would call the '+' method of the object '5' with the argument '6').
Unfortunately, in order not to conflict with the C syntax, the method names needed
to have a somewhat more limited syntax (though I still don't see why we couldn't
have a final identifier string after the last argument [object using: this and:
another togetdone]).
email@hidden
_______________________________________________
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.