Re:Avoid Else, Return Early (2013)
by RobertRoberts on Monday March 26, 2018 @01:12PM
(#16680531)
Can't that be taught as well? (both rules, and exceptions to rules?)
[ Parent
| on HN ]
Re:Avoid Else, Return Early (2013)
by macspoofing on Monday March 26, 2018 @01:24PM
(#16680667)
Sure.
But as a novice youd should adhere to rules. As you gain experience you learn when to break them.
Re:Avoid Else, Return Early (2013)
by RobertRoberts on Monday March 26, 2018 @03:30PM
(#16681706)
I think you read my comment backwards.
I think the "rule" should be "exit early", and the exception "multi-indent exit later".