xboard-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XBoard-devel] coding style


From: Byrial Jensen
Subject: Re: [XBoard-devel] coding style
Date: Tue, 03 Jan 2012 23:28:12 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111109 Thunderbird/3.1.16

Den 03-01-2012 23:21, h.g. muller skrev:

Guess this is a matter of taste... to me having those extra lines makes
it a lot more readable than the other version... mostly because I find
it easier to see where the block starts and ends by having the {} in the
same column...

Well, that can be achieved without uing extra lines by writing the
openig brace
on the same line as the firststatement (and closing braces on the same
line as
a following else). Like

if(A)
{ x = 1;
y = 2;
} else
{ x = 2;
y = 1;
}

This is actually the style I used in my own programs.

I have seen been many coding styles, and don't object to most as long as their are used consequent, but I really dislike to place anything in a line after a {. That really decreases the overall overview in my opinion, so I would be very opposed to this.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]