On Jun 12, 2019, at 7:36 AM, Michael Jones <michael.jo...@gmail.com> wrote: > > 128640 If statements, and just 8034 else, a 16:1 ratio. I'd like to > understand this better,
There are two patterns that encourage this: x := v1 if someCond { x = v2 } And if someCond { return ... } The second pattern acts sort of as a filter. Which is useful (fewer choices left). The first pattern is due to a lack of C’s ?: construct. [In light of that it is amusing to see try as a “function” being proposed that even does a conditional return!] -- 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 golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/44D09A2F-CCC7-492D-B06C-6D870E225283%40bitblocks.com. For more options, visit https://groups.google.com/d/optout.