Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Re^2: No Hard Tabs in Code

by Tux (Canon)
on Jul 01, 2010 at 16:09 UTC ( #847543=note: print w/replies, xml ) Need Help??

in reply to Re: No Hard Tabs in Code
in thread No Hard Tabs in Code

Someone setting a (e-mail) tab to 5 spaces is asking for horror. They deserve horror.

IMHO anyone setting a TAB to something other than 8 spaces should not send patches or be able to commit to a central repo.

I have no strong feelings for tab vs spaces. As long as they are used consistently within the team (teams are huge for open source projects), it is fine with me.

I much more care about indentation. Specifically with people that use cut-n-paste from other files and do not adjust it for the current file. Oh horror!

Enjoy, Have FUN! H.Merijn

Replies are listed 'Best First'.
Re^3: No Hard Tabs in Code
by ssandv (Hermit) on Jul 01, 2010 at 16:19 UTC

    8 spaces is a ridiculous waste of real estate, to me. It's far too much for a single layer of indentation, and I find it _harder and slower to read_.

    On the other hand, if you mandate tabs, and tab stops are smaller than the most extreme person prefers them to be, you get the ultimate disaster of mixed tabs and spaces--which is yet another good reason to turn everything into spaces.

    A 5-space first tab, for paragraph indentation, was the standard for fixed width text for a very long time until not all that long ago. How quickly we forget.

      [...] In short, 8-char indents make things easier to read, and have the added benefit of warning you when you're nesting your functions too deep. [...]

      Taken from Linux documentation (Doc*/CodingStyle) Chapter 1.

      I think this explains very well the idea behind the 8-chars tabs "movement".

      There are heretic movements that try to make indentations 4 (or even 2!) characters deep, and that is akin to trying to define the value of PI to be 3.

      (The second quotation was just for fun :D)

      Alex's Log -

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://847543]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (1)
As of 2021-10-23 07:59 GMT
Find Nodes?
    Voting Booth?
    My first memorable Perl project was:

    Results (87 votes). Check out past polls.