A recent article by Dev.to highlights a best practice in coding, suggesting that developers avoid using the ELSE keyword in their code. The author references Jeff Bay's book "Thought Works Anthology" and the concept of "Object Calisthenics", which emphasizes the importance of readability and comprehension. Two approaches are discussed: using only IF statements and implementing early returns. Early returns refer to interrupting the method execution as soon as a condition is met.

Source: https://dev.to/leandroats/if-else-early-return-1nb6

Reply to this note

Please Login to reply.

Discussion

No replies yet.