| ▲ | Jtarii 3 days ago | |
Never understood that if statement style, it seems to only exist to create subtle bugs. | ||
| ▲ | bch 2 days ago | parent | next [-] | |
I think of it as BSD style, though of course it could be suggested/mandated elsewhere -
As I look, GNU guide is less specific, but examples[1] show the same style.The good thing is that -Wmisleading-indentation [2] (comes along with -Wall) catches this indentation error. [0] https://man.openbsd.org/style - happens to be same for at least NetBSD. [1] https://www.gnu.org/prep/standards/html_node/Syntactic-Conve... | ||
| ▲ | array_key_first 3 days ago | parent | prev | next [-] | |
It's slightly less lines of code which is nice. I'm someone who prefers terseness so I get it. However, it's bad. I much prefer the rare, elusive, postfix if:
It can create some very readable code when used right, with short and simple conditionals. | ||
| ▲ | 3 days ago | parent | prev [-] | |
| [deleted] | ||