2 ms·
> why spend time to read 10 lines and figure out that it actually does what a simple ternary operation would accomplish?? Because when something is expressed i
by pier25 8y ago
> why spend time to read 10 lines and figure out that it actually does what a simple ternary operation would accomplish??
Because when something is expressed in 10 lines explicitly, generally you can simply skim over the code to get an idea of what's going on without having to go into the details.
"Smart and clever" code, like using nested ternaries, demands you to focus and try to figure out what is going on.
- wtetzner 8y ago> Because when something is expressed in 10 lines explicitly, generally you can simply skim over the code to get an idea of what's going on without having to go into the details. Which is why important details get missed when reviewing verbose code.