HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Coding standarts

SS ✭✭
edited April 2010 in Feedback
This http://vanillaforums.org/page/StandardsAndPractices tells nothing about indentation.
Garden use 4 spaces as indent symbol, and some other framework too
http://www.php-editors.com/pear_manual/faq.tabs-vs-spaces.html

I can argue why the tabs it's better than the spaces.
1. Tab - this one symbol, so it is semantically more comfortable and you can work with it anywhere.
2. Tab in terms of the indentation is fixed. One tab - one indentation.
Since space it is not obvious: if I put 8 spaces - this is one indent? two? four? And if we have a standard of 4 spaces to indent, but someone made a margin of 7 spaces... what does this mean?
3. Tab is configurable. I can reduce/increase the visual width, if I have the code in the width does not fit, or vice versa to increase, if there are indistinguishable levels of nesting (and some maniacs make indents on the 1-2 spaces), accordingly, I do not suffer from the fact that someone in making a corporate standard occurred to make indent in X spaces.

From the supporters of the spaces I mostly hear one compelling argument: "So google do that"
You're on!
(c) torkve @ Habr
Tagged:

Comments

  • I prefer tabs. It's quicker, configurable and you end up with smaller files. OK, that last one's a bit OCD, but hey :D
Sign In or Register to comment.