Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^6: How has your coding style changed over the years?

by Tux (Canon)
on Aug 12, 2022 at 06:12 UTC ( [id://11146113]=note: print w/replies, xml ) Need Help??


in reply to Re^5: How has your coding style changed over the years?
in thread How has your coding style changed over the years?

The opening brace goes on the line of the statement because

  • It saves vertical space: now I can see more code on my screen/window and have a bigger (over)view on the context
  • As the closing vrace, it is just syntax and by that reason does not deserve a line of its own
  • The closing brace has a line of its own, because the last line in the block is likely to change or new lines to be inserted before the brace.

(In an ideal world, my editor should optionally replace the line with the closing brace with a (coloured) hairline starting at the left indent of the block till the right edge of the windown.)

Maybe obvious from above: I am not a big fan of too much vertical whitespace. I'd forbid more than one blank line between logical blocks.


Enjoy, Have FUN! H.Merijn
  • Comment on Re^6: How has your coding style changed over the years?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2024-04-24 22:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found