Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: (MeowChow) Re2: best practice

by inverse (Acolyte)
on Aug 28, 2001 at 05:27 UTC ( #108324=note: print w/ replies, xml ) Need Help??


in reply to (MeowChow) Re2: best practice
in thread best practice

I actually prefered the above style for a long time. But it turns out many people can't stand it because it turns all code into a venisian blind of alternating white and black.

On the other hand lining up the braces seems very natural.

I have come up with the following compromise, which sacrifices ease of editing for readability:

if ($larry) 
{   foo();
}
elsif ($tom)
{   pie();
    if ($stooges)
    {   nyack();
}   }
else # Randal
{   cow();
}
BTW: Code Complete rocks


Comment on Re: (MeowChow) Re2: best practice

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (14)
As of 2015-07-30 18:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (273 votes), past polls