Good catch. Thanks. I'm in the process of reviewing the other posts now.
I just got lazy. Although to be honest I'm not a stickler for indentation style. My company, Prestwood Software, is a general development company and we see so many different styles (and use of a non-standard style) that indentation is more of a luxury than a necessity. I just tell my developers to fit in as best they can which is easier, of course, when K&R, Berkeley, or any of the others are in use. For new projects we have more influence but even then many of our clients have coding standards for us to follow. Going forward I will strive for consistency online.
In general I try to stick with the default coding style of the development tool I'm using and/or what I've seen most. Based on my experience, that means Berkley/Allman indent style for C++, Java, JavaScript, and PHP and a K&R indent style for C# (and Object Pascal but for Object Pascal it's rare to see the Berkeley indent style in use). I do use tabs for indentation but I convert tabs to spaces when writing because horizontal space is valuable and limited with web pages and printing.
|