Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^2: No Hard Tabs in Code

by Anonymous Monk
on Nov 25, 2010 at 06:03 UTC ( [id://873581]=note: print w/replies, xml ) Need Help??


in reply to Re: No Hard Tabs in Code
in thread No Hard Tabs in Code

I have two .perltidyrc files.

One contains just this line:

-pbp
The other contains various heretical statements such as
-i=3 # Indent level is 3 cols -et=3 # Use tabs for indents because I'm such a sociopath -ci=3 # Continuation indent is 3 cols -icb # Make closing braces align with the body of their block

As I'm editing code, I'll run perltidy over it with my preference for formatting. Before checking code back in, I'll run perltidy with the Perl Best Practices formatting, run ./Build test and commit.

I, too, draw a distinction between "indenting" and "alignment". I, too, program in languages other than Perl (such as Ruby, Python and PHP).

I also edit using a proportional font (DejaVu Sans is my current favourite), which renders any attempts at "alignment" futile. I cannot stand the practice of sticking in extra spaces to make the '=' symbols line up.

The perltidy tool lets me slip in under the radar of contemporary society.

Replies are listed 'Best First'.
Re^3: No Hard Tabs in Code (perltidy)
by tye (Sage) on Nov 25, 2010 at 23:37 UTC

    Until you run into constructs that perltidy misformats. Then your coworkers will eventually wonder, every time they fix the use of & to override a prototype and then you touch unrelated code in the same source file, why the space gets re-inserted stupidly...

    Do you at least look at the differences you are introducing before you finish checking in? Probably not. Probably making merge conflicts significantly worse plenty of times as well.

    - tye        

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2024-04-19 02:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found