I did fair bit of Smalltalk development back in school, so I know exactly where Obj-C/Cocoa naming conventions and 'message' syntax comes from. The problem is this: that naming convention doesn't make any sense in a statically typed language. It made sense in Smalltalk because the parameters sent to a message could be anything. It was a convention to avoid common erros. In Obj-C, on the other hand, it doesn't make any sense. Sure, it might sound like saying "message withBananaParameter: banana andCoconutParameter: coconut" is clearer and 'self documenting', but it's a waste of your time typing it (even when you use autocomplete) and the compiler parsing it. Let alone people reading your code in the future.
The indentation is arguable. I don't know whether that's the standard or not, but I dislike the fact that you are pushing stuff to the right, basically forcing yourself to break the parameter list a lot because you get closer to the "right margin". It looks like that indentation convention was specifically invented to make long parameters list harder to read (ironically, considering long parameter lists are an artifact of Smalltalk-like message/parameter convention.)
I've programmed in a bunch of languages and platforms over the yeas, and only three languages always keep bugging me when reading them: Obj-C (specially Cocoa code), Perl and very complex Javascript. There's something about them that just feels off.
I believe dguaraglia is talking about the types of arguments, which are often included in the method name. So you get things like [guy eatFood:food withHand:hand usingEatingStyle:eatingStyle]. Overall, it lends itself to exceptionally long lines of code, such that Objective-C message sends are often broken into multiple lines with lots of info on the right side of the window. For example, instead of:
I did fair bit of Smalltalk development back in school, so I know exactly where Obj-C/Cocoa naming conventions and 'message' syntax comes from. The problem is this: that naming convention doesn't make any sense in a statically typed language. It made sense in Smalltalk because the parameters sent to a message could be anything. It was a convention to avoid common erros. In Obj-C, on the other hand, it doesn't make any sense. Sure, it might sound like saying "message withBananaParameter: banana andCoconutParameter: coconut" is clearer and 'self documenting', but it's a waste of your time typing it (even when you use autocomplete) and the compiler parsing it. Let alone people reading your code in the future.
The indentation is arguable. I don't know whether that's the standard or not, but I dislike the fact that you are pushing stuff to the right, basically forcing yourself to break the parameter list a lot because you get closer to the "right margin". It looks like that indentation convention was specifically invented to make long parameters list harder to read (ironically, considering long parameter lists are an artifact of Smalltalk-like message/parameter convention.)
I've programmed in a bunch of languages and platforms over the yeas, and only three languages always keep bugging me when reading them: Obj-C (specially Cocoa code), Perl and very complex Javascript. There's something about them that just feels off.