3 ms·
Method Invocation Formatting Styles in Objective-C
- tlrobinson 18y agoPersonally I kind of like aligning the colons, but as he mentions it's not very common. Also, I like how he refers to Wil Shipley as a Penny Arcade character, as if that were the most important thing about him. Anyway, this is a great new Cocoa blog. Lots of quality posts.
- warwick 18y agoI recently rewatched a WWDC session video about designing user interfaces where it was mentioned that right-aligning labels allows users to scan through and fill out forms quite a bit faster. Aligning the colons seems like the same kind of idea, just for code instead of forms. I wonder if it yields the same kind of increases in comprehension as right-aligning labels does.
- kentosi 18y agoWith the little code i've done on objective-c, I have to say that I prefer method 4. It kinda goes with the (unwritten) convension that a method's first parameter is always the longest so that the rest of the parameters align well with the colon character. And I don't think you can always rely on code-formatters. There are always cases when you need to manually format a piece of code to make it look more sensible.