Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: The One True Style of indentation:

by Anonymous Monk
on Apr 20, 2002 at 15:53 UTC ( [id://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.

Replies are listed 'Best First'.
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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://160793]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2024-04-18 22:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found