[opening brace on the same line as preceding code]
I prefer it that way. It looks a lot tidier in my view and with indenting
code blocks are very easily distinguished.
I don't really see the point of putting them there - It just takes up more
paper when you come to print the stuff out!
This is becoming a bit of a troll since code formatting preference is almost
a religion but nonetheless I feel my comments really matter so here goes.
Saving paper... It seems this is the one reason for not putting block
delimiters on the same vertical line. For clarity I see only drawbacks. When
was the last time you printed out a code file? This was done when
programmers only had line editors!
It is like one of those things that once had a pupose and just won't die
after the original reason for them vanished. Like underlining text to
emphasise, which was once the only way for type writers to emphasise
anything.
Be it "begin" and "end" or "{" and "}", compound statement delimiters should
be either on separate lines starting in the same column or optionally both
on the same line if the statement enclosed is more trivial than the compound
construct itself.
I feel it is a good thing that Microoft or any other tool vendor sets
standards for things like formatting and naming conventions, ideally they
should be part of the language. We will probably continue to see people use
bMyBooleanVariable and strMyStringVariable for quite a while, which was once
the only way to make the lack of type safety a bit less dangerous. I catch
myself still using prefixes for GUI controls as in tbxAmount where it should
be amountTextBox. Old habits die hard...
Martin.