Decades of programming practise hasn't been able to settle this matter. There are just two rules you should follow: use whatever makes you feel comfortable, and second be consistent. Don't take a maintainance programmer into consideration unless you actually write code that someone will inherit. But even then, whatever you do, someone else will do differently. The maintainance programmer must adapt - that's why (s)he's a maintanance programmer. Just don't use extremes. An indent of 0 or 1 is too small. More than 8 is overdoing it. But 2 to 8 is used (well, perhaps with the exception of 7).

Personally, I tend to use a 4 character indend for languages that use braces to delimit blocks, and 5 characters that uses keywords to end blocks. But I've used a 2 character indent for more than a decade as well.

As for <TAB>s, <TAB>s have their place. That's "place", singular, not "places", plural. The place for <TAB>s is called Makefile.

Abigail


In reply to Re: The classical TAB issue by Abigail-II
in thread The classical TAB issue by Lorand

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.