On Thursday, 24 March 2016 08:41:55 UTC+1, Linus Drumbler wrote:
I dislike how "break" is treated inside switches in Go.
I dislike how "break" is treated inside switches in Go.
"indentation" level. In your "if-else" you quickly run into cases where
you have 5 nested ifs, if you have no way of getting out of the "case".
With "break", you can do what you want and "return" early. That way you
don't stack up your ifs, making the code easier to read, similar to how Go
promotes "return early on errors".
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.