develooper Front page | perl.golf | Postings from January 2006

Re: PBP

Thread Previous | Thread Next
From:
Andy_Bach
Date:
January 19, 2006 11:35
Subject:
Re: PBP
Message ID:
OF315C92B4.670878DC-ON862570FB.006B43C6-862570FB.006B9267@uscmail.uscourts.gov
> Everyone(tm) knows(tm) that the "Proper Indentation"(tm) is:

if(FOO)
  {
  print "foo!";
  }
else
  {
  print "bar!";
  }

That's nuts! Er, I mean except for those on the Damian(tm) side:
Everyone(tm) knows(tm) that the "Proper Indentation"(tm) is:

if(FOO)  {
  print "foo!";
}
else  {
  print "bar!";
}

else and if are at the same 'level' so they should be at the same indent. 
The bare close curlies make it easy to comment:

if(FOO)  {
  print "foo!";
}      # if (FOO) - where we're foo-ed
else  {
  print "bar!";
}      # else not FOO - usually 'cause we're bar-ed


Though I favor:
if(FOO)  {
  print "foo!";
} else  {
  print "bar!";
}

a

Andy Bach, Sys. Mangler
Internet: andy_bach@wiwb.uscourts.gov 
VOICE: (608) 261-5738  FAX 264-5932

"On the Internet, nobody can hear you being subtle," Linus Torvalds

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About