3 ms·
A lot of people say "You could write this X/Y block in one line" or "You can simplify this". A lot of the times they don't mean simplify, they mean compact cod
by sergioisidoro 7y ago
A lot of people say "You could write this X/Y block in one line" or "You can simplify this".
A lot of the times they don't mean simplify, they mean compact code.
I write verbose code, as explicit as possible. Sometimes it looks like it was written by someone just learning to program. And that's on purpose to make the code as easy to understand and change as possible.
TL:DR: Be skeptical about code "simplification" and don't fall on using fancy language features when if/else conditions do the job.