Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Re^5: My coding guidelines

by demerphq (Chancellor)
on Sep 09, 2005 at 07:31 UTC ( #490457=note: print w/replies, xml ) Need Help??

in reply to Re^4: My coding guidelines
in thread My coding guidelines

In my experience the problem comes when people use editors that use tabs set at 8 spaces, and indentation rules of 4 spaces, with the editor autobundling 8 spaces into a tab when it can. This is a common editor set up IME, and just positively sucks when you change the size of tabs. And that was my point, using tabs you end up in debates about crap like this, using spaces you never do.

Theres another aspect of Tabs that I havent seen mentioned, and that is their impact on a diff. One thing I find particularly annoying is that tabs in your code can lead to diff saying a line has changed but when you look at the line it looks identical. Its only when you notice that somone has accidentally stuck a space in front of a tab that you realize why diff is telling you what it is. IMO avoiding such scenarios is a good reason in itself to avoid tabs. Just like IMO its a good reason to avoid trailing whitespace.

Anyway, this is one of those debates that I believe has proved intractable. There will always be stalwarts out there for one side or another. All i can say is that the pain of dealing with multiple tab sizes, and even tabs in general, has made me adopt a policy of: no tabs in source code, no trailing whitespace in source code.


Log In?

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (2)
As of 2021-09-29 01:58 GMT
Find Nodes?
    Voting Booth?

    No recent polls found