Basic coding style

Max Samukha spambox at d-coding.com
Tue Nov 23 16:03:17 PST 2010


On 11/23/2010 11:18 PM, spir wrote:
> Seriously, I fail to see how braces one their own line help visually catching code structure

I agree that brace alignment has little to do with catching code 
structure. It is more about symmetry. And visual symmetry of braces in 
code is a matter of preference. I prefer symmetry. I have read and 
written quite a lot of code in various coding styles and aligned braces 
still look and feel cleaner to me, no matter how hard I try to be unbiased.

Regarding that vertical space argument, in my experience, big contiguous 
chunks of code are rarely read or written in one go (except when you are 
unlucky to read one of those just-get-the-job-done(TM) functions 
spreading a few dozens of screens). So saving vertical space is not a 
big concern in practice. And if you are using a good IDE, it is no 
concern at all.

 > (and it's not only me

http://en.wikipedia.org/wiki/Argumentum_ad_populum





More information about the Digitalmars-d mailing list