2 ms·
Sometimes, if-statements unnecessarily add lines, and the lines become harder to read. I would say it's a case-by-case statement. Well, okay, more specifically
by sukuriant 16y ago
Sometimes, if-statements unnecessarily add lines, and the lines become harder to read.
I would say it's a case-by-case statement. Well, okay, more specifically, I would say that the use of a single ternary if is a case-by-case statement.
- wlievens 16y agoAbsolutely. I use ternary if when appropriate. But nesting ternary ifs is horrible, and nesting ternary ifs while discarding parentheses is malevolent.