in reply to perltidy: trying to indent closing brace one level more than the starting indentation

And if you had to embed another if you would do:
if ( 1 ) { if ( 1 ) { print "foo" } }
Seems,,, obtuse.


Evan Carroll
www.EvanCarroll.com
  • Comment on Re: perltidy: trying to indent closing brace one level more than the starting indentation
  • Select or Download Code

Replies are listed 'Best First'.
Re^2: perltidy: trying to indent closing brace one level more than the starting indentation
by Argel (Prior) on Apr 03, 2006 at 18:20 UTC
    I'm not sure what your point is. For one liners like you show it isn't perfect but then who the heck writes one liners like that? For longer blocks of code I find it much easier to follow if the closing bracket has the same indentation as the contents of the block. Why? It's simple layout and design. When the bracket lines up with the contents of the code block it's a striaght line all the way back up to the opening statement. However, when the opening and closing indentation match then your eye will be drawn to the right a bit by the indented code in the block as you follow it up. Very loosely: '|' vs. ')'.