News for hackers. Stuff that matters.
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:

    - (void)doSomethingWithParameter:(NSString *)parameter;
Re:Clean, Modern Objective-C by maxjg on Thursday February 20, 2014 @01:15AM (#7269206)
That is the convention officially endorsed by Apple (https://developer.apple.com/library/ios/documentation/Cocoa/...)
Re:Clean, Modern Objective-C by rbritton on Thursday February 20, 2014 @01:15AM (#7269203)
That's what I use as well. In Apple's frameworks I've found them to be very inconsistent between different areas though.
Re:Clean, Modern Objective-C by mpweiher on Thursday February 20, 2014 @04:18AM (#7269806)
Maybe because these things simply don't matter.

Worse than that, they distract from things that do.

Bike shed?

Re:Clean, Modern Objective-C by lyinsteve on Thursday February 20, 2014 @01:16AM (#7269210)
You're correct. I've updated the post with credit to you, thanks!
Re:Clean, Modern Objective-C by zefhous on Thursday February 20, 2014 @01:23AM (#7269229)
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.
Re:Clean, Modern Objective-C by lyinsteve on Thursday February 20, 2014 @01:28AM (#7269238)
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.
Re:Clean, Modern Objective-C by atburrow on Thursday February 20, 2014 @01:28AM (#7269240)
That is my preferred method as well, but I've seen a lot of templates use:

-(void) doSomethingWithParameter:(NSString *)parameter;

Re:Clean, Modern Objective-C by pjscott on Thursday February 20, 2014 @01:58AM (#7269336)
When in Rome, do as the Romans do.