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

Re: The One True Style of indentation:

by mattr (Curate)
on Apr 15, 2002 at 10:40 UTC ( #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
Node Status?
node history
Node Type: note [id://159130]
help
Chatterbox?
[ambrus]: Corion: no, backwards. It's possible in the general case, but not in the specific case of bad data we have. Which is why it's harder to explain.
[marto]: that reminds me, to donate...
[ambrus]: If it was possible in this specific case, then the burden to argue for that would be his.
[Corion]: ambrus: Ah, but he's the boss, so the burden to show that it's impossible still lies on you :-)
[Corion]: ambrus: I would work with him through an example

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (8)
As of 2017-12-12 13:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (332 votes). Check out past polls.

    Notices?