title: Objective-C "messages" - what's the right way to read it?
body: <p>You can declare a method in objective-c and name <b><em>each parameter twice</em></b>, basically.</p>
  
  <p>I get the idea that this is powerful, but I'm not quite sure how to use it yet...</p>
  
  <p>When John Greets Kelly:</p>
  
  <p><code>[ p Greet:"John" toPerson:"Kelly" greetWith:"hey babe" ] ;</code></p>
  
  <p>Something about it doesn't read naturally.  I'm not sure if that's how an experienced objective-c programmer would write that "message".</p>
  
  <p>Can someone explain the reason for two names for each parameter and possibly a more useful example of how this can be used effectively to put meaning in the program?</p>
  
  <p>Also something bothers me and that is the <strong>name of the first parameter</strong> is basically the same as the name of the '<em>message</em>'.  How do you resolve that in writing meaningful and understandable method/'message names'?</p>
  
  <pre>
  #import &lt;Foundation/Foundation.h&gt;
  
  @interface Person : NSObject
  {
  }
  
  -(void)Greet:(char*)from toPerson:(char*)to greetWith:(char*)greeting ;
  
  @end
  
  @implementation Person
  
  -(void)Greet:(char*)from toPerson:(char*)to greetWith:(char*)greeting ;
  {
    printf( "%s says %s to %s\n", from, greeting, to ) ;
  }
  
  @end
  
  
  
  int main (int argc, const char * argv[])
  {
    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
  
  
    Person * p = [ Person alloc ] ;
  
    [ p Greet:"John" toPerson:"Kelly" greetWith:"hey babe" ] ;
    [ p Greet:"Kelly" toPerson:"John" greetWith:"get bent" ] ;
  
    [ p release ] ;
  
  
  
    [pool drain];
    return 0;
  }
  
  </pre>