leroux / hackdb

A little KV store.
1 stars 0 forks source link

keep if statement to one line if only one statement #20

Closed tbuchok closed 11 years ago

tbuchok commented 11 years ago
if (condition) statement;
JosephMoniz commented 11 years ago

This coding style has been banned in many of the organizations i've worked in. Consistency tends to be a more important thing the brevity.

"Programs are meant to be read by humans and only incidentally for computers to execute" - Donald Knuth

Always consider that code is read more then it is written and at the end of the day, always do what you feel is the correct thing in terms of what makes your code the easiest to comprehend.