Earlier quoted context omitted.
Fully agree! Combinations of if/else can seriously damage readability and maintainability. I (all the time) face verbose code that pretend to be readable and that requires lots of attention just to find out you are setting a single variable across 10-20 lines. Example: if (cond1) { myVar = 1; } else if (cond2) { if (cond3) { myVar = 10; } else { myVar = 100; } ... } else { myVar = defaultValue; } * huge number of lin…
What we should be able to write in Go, but can't because the compiler (wrongly) imposes formatting: if a { v = 1 } else if b && c { v = 10 } else if b && !c { v = 100 } else { v = d }
The problem is that if one of the conditions changes, for example due to a variable renaming, you likely have to change the alignment on all lines.
Aside from being very tedious even if you're a lone coder, this creates noise in diffs that makes automatic merges fail much more frequently.