Is there anyone out there that codes like me?
- by Jacob Relkin
Hi,
Some people have told me that my coding style is a lot different than theirs.
I think I am somewhat neurotic when it comes to spacing and indenting though.
Here's a snippet to show you what I mean:
- ( void ) applicationDidFinishLaunching: ( UIApplication *) application {
SomeObject *object = [ [ SomeObject alloc ] init ];
int x = 100 / 5;
object.someInstanceVariable = ( ( 4 * x ) + rand() );
[ object someMethod ];
}
Notice how I space out all of my brackets/parentheses, start curly braces on the same line, "my code has room to breathe", so to speak.
So my questions are a) is this normal and b) What's your coding style?