On 19 Apr 2001 14:08:13 -0700, ..s.c.o.t.t.. [gts] <[EMAIL PROTECTED]>
wrote:
>OOooo...
>
>it drives me nuts when i see beginning brackets
>on seperate lines ;)
>
>i like to start brackets on the same line as the
>statement and finish them on a line of their own.

Very strong agreement here. I think a lot of it depends on your environment.
Some have syntax highlighting and, better yet, syntax highlighting which will
prominently mark unbalanced braces, brackets, etc. Also very nice are things
like a brace-matching hotkey or options to highlight the matching open
character when you close it. If you have all of these tools to help show
syntax, I don't think you need as help from the source formatting.  (The only
times I've liked having them on separate lines is when I've been working with
an editor which lacks this)

It also helps to properly indent things. I think code like this makes it pretty
easy to see which code is in which block:

if () {
        ...
        if () {
                if () {
                        // Do something
                } else {
                        // Do something else
                }
        }
} else {
        ...
}

This is one thing I've always liked about Python. Forcing people to indent
consistently is a little harsh but it does have the advantage of making strange
code easier to decipher.

>(it drives me nuts to see  "} else {" also)

Here, I have to differ - using anything else makes me itch. 

-- 
"Any sufficiently accurate worldview is indistinguishable from cynicism"

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to