I'm just curious. It seems like the overwhelming majority of code that I look at uses the following convention:
But I've always thought that the following arrangement of the brackets was vastly more readable:
So, the question is, if anybody here prefers the above format, is there any specific reason?
Code:
function foo(float x) {
if (x = 1) {
//do stuff
}
else {
//do other stuff
}
}
But I've always thought that the following arrangement of the brackets was vastly more readable:
Code:
function foo(float x)
{
if (x = 1)
{
//do stuff
}
else
{
//do other stuff
}
}
So, the question is, if anybody here prefers the above format, is there any specific reason?