Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: The One True Style of indentation:

by Anonymous Monk
on Apr 20, 2002 at 15:53 UTC ( #160793=note: print w/ replies, xml ) Need Help??


in reply to Re: The One True Style of indentation:
in thread The One True Style of indentation:

As long as the code is readable, it seems to me that the amount of indentation is largely a matter of personal preference.

Sure, as long as you're not trying to work with other people. And you have to work with other people! If you're on a project with several folks, there has to be some agreeable standard or things get messy. If you want to send in patches to an author you have to conform to their indentation style (or lack there-of).

The real fun comes in that after you've been using K&R one-tab indentation for long enough, other formatting becomes much less readable. When I'm debugging other people's code I find it's faster for me to reformat the code and then debug it. 90% of the time reformatting makes the bugs stand out like fire flies in a cave.

Using tab indentation and letting people choose the size of their tab stop helps people share code while maintaining some personal freedom of how to look at things.


Comment on Re: The One True Style of indentation:
Re: Re: The One True Style of indentation:
by emcs (Scribe) on Apr 21, 2002 at 01:15 UTC
    Sure, as long as you're not trying to work with other people. And you have to work with other people!


    Thanks Anonymous Monk.

    It seems that I jumped in at the beginning of this thread, with little knowledge of the bigger picture, and a very limited viewpoint.

    However, I learned a lot from reading all the follow up posts.

    emcs

    The dogs bark; but the caravan rolls on.

Log In?
Username:
Password:

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

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

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











    Results (171 votes), past polls