DEV Community

loading...

Discussion on: Write better code and be a better programmer by NEVER USING ELSE statements

Collapse
chadj2 profile image
Chad Juliano

Congrats on publicizing this idea! I led integration teams for years and I tried to explain to them why nested if/else statements negatively impact the ability for other people to read and maintain code.

Code is always easier to deal with when its flow is kept as linear as possible and the happy path is clear. I think most people I spoke with never got this concept and it is good to see this.