Code is a tree, code is about nesting. If you do not like nesting, you do not like code.
Code is not 'text'. You do not read code top to bottom like text. Code has a structure, and you read that structure.
And if an example of 'improvement' doubles the line count, you have a pretty good indication you are doing something wrong.
What seems to have happened is a small piece of advice has been taken too far. The early-return shortcut is reasonable. It is indeed advocated by Fowler and Beck (who deserve some trust) -- they call it 'replace nested conditional with guard clauses'. But that is something very particular. It does not suggest removal of all nesting in general.
Code is a tree, code is about nesting. If you do not like nesting, you do not like code.
Code is not 'text'. You do not read code top to bottom like text. Code has a structure, and you read that structure.
And if an example of 'improvement' doubles the line count, you have a pretty good indication you are doing something wrong.
What seems to have happened is a small piece of advice has been taken too far. The early-return shortcut is reasonable. It is indeed advocated by Fowler and Beck (who deserve some trust) -- they call it 'replace nested conditional with guard clauses'. But that is something very particular. It does not suggest removal of all nesting in general.