
Objective-C Parameter Names Unneeded in Headers - makecheck
In an Objective-C "@interface" the names for parameter variables don't really matter.  In fact, they can all be <i>exactly the same name</i>, and different from the "@implementation", which is useful in header files.<p>Method names are almost always descriptive enough.  If parameter names are identical, there's less to maintain; I like using a single underscore "_" for all header-file parameters.<p>Here's an example of a method that has lots of parameters, where the parameter names are kind of pointless:<p><pre><code>  @interface UIView : . . .

  + (void)
  transitionWithView:(UIView *)         view
  duration:(NSTimeInterval)             duration
  options:(UIViewAnimationOptions)      options
  animations:(void (^)(void))           animations
  completion:(void (^)(BOOL finished))  completion;

</code></pre>
They could actually have just said this (changing all names to "_"):<p><pre><code>  @interface UIView : . . .

  + (void)
  transitionWithView:(UIView *)_
  duration:(NSTimeInterval)_
  options:(UIViewAnimationOptions)_
  animations:(void (^)(void))_
  completion:(void (^)(BOOL finished))_;</code></pre>
======
kstenerud
If you want to generate documentation for your API, this won't work.
Documentation generators such as doxygen require unique parameter names in
order to function correctly.

Slightly related, I'd argue that "animations" is very poorly chosen. A plural
noun indicates a set or collection of objects, whereas this is a block pointer
to be used for... something...

~~~
makecheck
It's possible to make Doxygen look at a source file instead of a header...at
least in C++ it is.

As for the name, this is Apple's method name from UIView so ask them. :)

~~~
kstenerud
It might be possible with Objective-C as well, but then you end up with it
exposing all your private stuff (unless you manually mark everything internal
as "hands off"). Not sure which would end up being more work. Furthermore, it
means that the users of your API can't look at the header file (via CMD-click)
for an explanation.

