[quote]With most code editors now allowing for “folding code” (that is to say, a little plus-sign twiddle that allows you to hide the code between the braces at your discretion) I find there is no reason to worry about vertical space.
[/quote]
The most ancient of the few C++ gurus I know used to agree that the main reason for style 1 was back in the day of poor IDE’s, where it was a distinct time-saver to reduce the number of lines in your source code, and save you all that scrolling!
Back when C++ was pretty new, things like this became a de-facto standard because they were most appropriate for the tools people were using. Similarly, it was back in those Dark Ages that super-short variable names were invented, which included FULL type information for the variable, using one-letter codes.
E.g.:
public static final boolean[] pSfbAmyArray;
When you can’t do syntax-highlighting, and your compiler isn’t too hot at “invalid type conversions”, things like that can be a life saver. But for normal people nowadays it’s just silly.
Equally, the fear that some people still have of writing any variable name more than about 6 characters long used to be valid. But really - is it that hard to learn to hit the TAB key? (or ctrl-space if you’ve been trained by MSVC)?