Over the years I've relaxed my brace and paren attitudes. If someone has been consistent, after a few minutes I can get the feel of their style and focus on the logic of their code and get hacking.
What still ties me up in knots, and this is about my own coding habits, not other people's code, is long lists of function parameters. I can never decide which is more appealing to the eyes, easier to read, and all while conserving vertical space. So...
public function someBigLongFunctionNameThatTakesLotsaSpace( $paramOne, $paramTwo, $paramThree, $paramFour) {
...
...
}
or
public function someBigLongFunctionNameThatTakesLotsaSpace( $paramOne,
$paramTwo,
$paramThree,
$paramFour) {
...
...
}
or
public function someBigLongFunctionNameThatTakesLotsaSpace( $paramOne, $paramTwo,
$paramThree, $paramFour) {
...
...
}
or
public function someBigLongFunctionNameThatTakesLotsaSpace(
$paramOne,
$paramTwo,
$paramThree,
$paramFour) {
...
...
}
Awesome title :D
Over the years I've relaxed my brace and paren attitudes. If someone has been consistent, after a few minutes I can get the feel of their style and focus on the logic of their code and get hacking.
What still ties me up in knots, and this is about my own coding habits, not other people's code, is long lists of function parameters. I can never decide which is more appealing to the eyes, easier to read, and all while conserving vertical space. So...
or
or
or
Probably the last one is better. For me, I try to prevent my eyes travelling far to the right. That makes me lose focus easily.
Agreed. Also, I don't mind having multiple parameters in one line, but I really need them to be on the left side.
Thanks :D