News for hackers. Stuff that matters.
Re:Avoid Else, Return Early (2013) by bjourne on Monday March 26, 2018 @11:17AM (#16679508)
Ceteris paribus, shorter code always is more readable. It's the only guideline I've found true regardless of programming language or environment. Shorter is better.
Re:Avoid Else, Return Early (2013) by timoxley on Monday March 26, 2018 @12:41PM (#16680203)
It depends. Short, dense code can make the code more difficult to understand/change later, while overly bloated code can have the same effect.

I often find inelegant, yet straightforward solutions are generally better options than dense, mathematically pure solutions, simply because inelegant code usually relies on fewer assumptions. Noting that code rarely/never evolves the way we expect it to, apply Occam's razor and strike a balance.

Re:Avoid Else, Return Early (2013) by bjourne on Monday March 26, 2018 @01:32PM (#16680741)
No it doesn't depends. That's what ceteris paribus means.
Re:Avoid Else, Return Early (2013) by GVIrish on Monday March 26, 2018 @02:59PM (#16681484)
Shorter code may or may not make things more readable. If brevity was the key to readability, we'd all be minifying all code we write to make it more readable.

Readability is about clarity of intent and function, as well as sensible structure. Sometimes that means writing slightly more code with more expressive naming so that the code is easier to follow. Sometimes that means using a given language's shortcuts to condense things down.