How did the convention to eliminate gaps in declarations of the Obj-C method arise?

How is it that there are no spaces in the method declaration?

-(UITableViewCell*)tableView:(UITableView*)tableView cellForRowAtIndexPath:(NSIndexPath*)indexPath

It seems like everyone is doing this, 90% of the examples I see are generated templates, other people's code, etc. etc. I suspect this is another vi / emacs ideological thing, but wondered if there is a K & amp R-type of the “root cause” of behavior.

I like a lot of spaces:

- (UITableViewCell*) tableView: (UITableView*) tableView
         cellForRowAtIndexPath: (NSIndexPath*) indexPath

It seems to me much better.

+5
source share
3 answers

, , . , Apple , , .

Objective-C, . . , , , . . , . , , .

, , - . , . , . , - . Apple . , , - + - . , , - . ( C/++, .)

, , . =)

+3

, . , . :

- (id) actionWithParam: (id) param object: (id) someObject andMore: (id) another

- (id)actionWithParam:(id)param object:(id)someObject andMore:(id)another

,

param object: (id)

, , . , , .

+1

Objective-C , (tableView: cellForRowAtIndexPath:), , . , .

0

All Articles