CODE INDENT FORMATTING STYLE

The forum has been a bit slow lately so I will start a discussion.

What style of code formatting do you prefer and why? If you do not know about various styles, you can look here:
http://www.terminally-incoherent.com/blog/2009/04/10/the-only-correct-indent-style/

I personally prefer Whitesmith which is also the style Paul the Apostle used when writing Bible Code.

I prefer Allman, for me it just makes it look more readable and easier to follow.

K&R or Allman. Personally, Allman but at work we use a modified K&R ( mainly just spacing differences. ).

My boss comes from the old C style and that was how he always did it.

I find Allman easily readable and easier to see when a bracket or something else is missing. Luckily, I can also define multiple styles in my IDE depending on whom the project is for.

[member=72272]astonecipher[/member], what IDE do you use?

I switch between PHP Storm and Zend Studio, but have been using Zend more lately. Some of the projects I work on have tens of thousands of files and it is nice to click on a method and be taken to its parent Class or see what else calls it.

12.5 also has a feature where you can build specifically for mobile and see what it will look like.

K&R, althought Whitesmith makes the ELSE stand out better!

K&R would be my preferred style.

Sponsor our Newsletter | Privacy Policy | Terms of Service