Sunday, November 16, 2014

} else {

My superior really doesn't care for my love of...

} else {

 
 

...and is pretty vocal of having me break it into three lines* like so:

}
else
{

 
 

*At least this is the case in C#, not JavaScript where I still do it.

How did I fall in love with } else { anyways? I think this was an old PHP convention. I like that it tucks everything onto one line. Also, if I can make an if statement and what happens should the if statement's condition be met be one line of code, I'm going to do so. They didn't like this at my prior place of employment.

No comments:

Post a Comment