Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^5: Little annoying mistakes ... of others

by Jenda (Abbot)
on Dec 08, 2008 at 22:55 UTC ( [id://729048]=note: print w/replies, xml ) Need Help??


in reply to Re^4: Little annoying mistakes ... of others
in thread Little annoying mistakes ... of others

If the block does not have a statement it belongs to then of course the opening curly will be the first and only thing on a line. Which is yet another reason not to put the ones that do belong to a statement on the beginning of a line. I'd rather know whether something is the body of a loop or other control structure or a bare block introduced to limit the scope of some variables. And if I ever need to comment out the whole block, I'll need to comment out the statement as well.

As for statements broken into multiple lines ... you may use different level of identation. Say two spaces for multiline statements and four for blocks. I do not find the need, I do not write that many multiline statements, those I do usually do not start with statements that have a block, and if they do I'll indent them somewhat line this:

while (some very very complex condition ) { ... ... }

Replies are listed 'Best First'.
Re^6: Little annoying mistakes ... of others
by SuicideJunkie (Vicar) on Dec 09, 2008 at 17:59 UTC
    In any case, the reason that there is more than one common format is because they're all preferred by some largeish group of people. Which one works best for you depends on how you think.

    The point I was originally trying to make is that annoyance at people using a different style goes in both (all) directions.
    Stylistic choices really should not count as a "mistake" anyways. As long as there is a simple way to translate between them, they won't be much of a problem in practice.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (9)
As of 2024-04-19 16:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found