Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Re: The One True Style of indentation:

by Anonymous Monk
on Apr 17, 2002 at 21:14 UTC ( #160006=note: print w/replies, xml ) Need Help??

in reply to The One True Style of indentation:

When people cannot agree on visual indentation within a development team, the solution is to encode indentation with one hard tab per indent step, and have everyone configure their editor to display hard tabs the way they like. This screws more(1) and diff(1) outputs of course. One can argue that a hard tab in a file is a markup code for user-defined indent step, just like in MSWord or FrameMaker.

Replies are listed 'Best First'.
All hail the benevolent dictator
by petdance (Parson) on Apr 17, 2002 at 21:23 UTC
    When people cannot agree on visual indentation within a development team,

    This is one of those times that a benevolent dicatatorship has its benefits. Programmers have bigger things to deal with than piddly-shit arguments like tabs 'n' spaces and brace style.

    The key is that all the tools support whatever people want to do. The solution of "some do this, some do that" is not acceptable if it means that diff doesn't work, for example. In that case, a decision must be made, or tools adapted, or productivity suffers.

    <megaphone> Throw down the gun and tiara and come out of the float! </megaphone>

Re: Re: The One True Style of indentation:
by chromosundrift (Novice) on Apr 18, 2002 at 00:20 UTC

    That won't always work if you ever try to line things up using spaces on top of tabs.

    If you have to work in a team, I think consistency is more important than "the best way". There should be one true brace/indenting style PER TEAM.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://160006]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2018-06-20 10:25 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (116 votes). Check out past polls.