The proposal I opened for this was declined recently: https://github.com/golang/go/issues/23196
Matt On Saturday, May 5, 2018 at 11:35:08 PM UTC-5, Simon Chevrier wrote: > > Hi, I know this is kind of old and I'm not sure anyone will answer, but > even after the previous discussion I feel like any kind of switch-like > statements should be able to fallthrough. > > The answer that it doesn't make sense because you're supposed to choose > between different available channel operations is not really a good point > because you could say the same thing for the switch statement. > The switch statement is supposed to choose from a set of unique values, so > it doesn't make sense to fallthrough another value? > > My point is that the fallthrough operation allows us to define common code > for different cases, which could be really useful in any switch-like > statements. > > On Thursday, January 22, 2015 at 6:26:40 PM UTC-5, i3dmaster wrote: >> >> In Go, select and switch statements are similar just that select is >> specific for channel multiplex operations. The fallthrough statement is >> defined to flow the control to the next case statement, upon reading the >> lang spec, it does not seem that specific to the "switch" statement, but >> yet for some reason, it is only defined for switch. >> >> Anyway, maybe someone could enlighten me a bit as of why we have chosen >> not to support fallthrough in select. And just for my greedy heart, can we >> add it to select... >> > -- 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.
