Re:Clean, Modern Objective-C
by zefhous on Thursday February 20, 2014 @01:10AM
(#7269181)
I'm surprised that he provides five versions of the method definition syntax and none of them are what Apple does and what I consider to be the standard:
[ Parent
| on HN ]
That is the convention officially endorsed by Apple (https://developer.apple.com/library/ios/documentation/Cocoa/...)
That's what I use as well. In Apple's frameworks I've found them to be very inconsistent between different areas though.
Maybe because these things simply don't matter.
Worse than that, they distract from things that do.
Bike shed?
You're correct. I've updated the post with credit to you, thanks!
No problem! Have you commonly come across all these variations? I have seen a couple different things but my experience working in objective-c written by others has been limited, so my impression was that the above was more widely accepted.
I contribute to CocoaPods repositories, so I've seen a lot. I don't really feel adamantly one way or the other, but just be consistent.
That is my preferred method as well, but I've seen a lot of templates use:
-(void) doSomethingWithParameter:(NSString *)parameter;