Quote:
Originally Posted by oo_jazz_oo
I dont see a huge problem in using one line codes without brackets for certain instances.
PHP Code:
function check(x, y) {
if (x == y) return true;
}
Like in that instance. Does it really make it any more readable...any more efficient...any more anything by adding the brackets?
|
Yes, it makes it more readable, and it makes it easier to expand upon, especially if some parts of the code aren't properly indented. There are tons of arguments for this on stackoverflow and other programming sites—check them out.