Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

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.

---
$world=~s/war/peace/g


Comment on Re^5: My coding guidelines

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (13)
As of 2014-09-17 14:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (86 votes), past polls