khoi@slrpnk.net to Go programming language discussion@lemmy.ml · 1 year agoShould I use naked return? If not, why? If yes, when?message-squaremessage-square3fedilinkarrow-up17arrow-down10
arrow-up17arrow-down1message-squareShould I use naked return? If not, why? If yes, when?khoi@slrpnk.net to Go programming language discussion@lemmy.ml · 1 year agomessage-square3fedilink
minus-squarestifle867linkfedilinkarrow-up1·1 year agoYou can usually restructure your code to avoid them and would suggest to do so where possible. In the same vein as GOTO being bad practice. It’s simpler being able to follow a function’s flow from top to bottom.
You can usually restructure your code to avoid them and would suggest to do so where possible. In the same vein as GOTO being bad practice. It’s simpler being able to follow a function’s flow from top to bottom.