Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: The One True Style of indentation:

by mattr (Curate)
on Apr 15, 2002 at 10:40 UTC ( [id://159130]=note: print w/replies, xml ) Need Help??


in reply to The One True Style of indentation:

I use two spaces for manual indentation in Perl, and to continue a block of information in my own todo lists which are ascii, two newlines separating each block. It prints well and looks sane to me..

I use XEmacs which seems to get it right, tab eq 2 spaces. Personally I just find it to be the right amount, it generally leaves me enough room for short comments on the same line even when nested.

I learned curlies from Niklaus & Wurth but forget what they said.. I use

if (true) {
  woop;
} else {
  werp;
}

..Vertical real estate is important too. The real holy war is, how do you line up long || statements (over 2 lines for me)..

if ( (longthing > foo) || (anotherthing < moo) || (boo) ) { werp; }
Right??!?!?!? (smiling like jack n. in the shining) hee hee hah hah ahaha ahaa!!

Replies are listed 'Best First'.
Re: Re: The One True Style of indentation:
by tretin (Friar) on Apr 15, 2002 at 12:43 UTC
    TAB's what it's all about. Easy to keep anything and everything lined up perfectly, and with a minimum of counting and such...

    work it harder make it better do it faster makes us stronger more than ever hour after our work is never over.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (3)
As of 2024-03-29 06:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found