but fallthrough is explicitly spelled out and the semantics is clearly defined in the language, any side effects would be by design isnt it? In other word, the programmer who wrote that has explicitly allowed such effect to happen, compare to C's implicit fallthrough.
Note the fallthrough statement is also disallowed for type switches, as this would be dangerous.
Falling through select declarations, assignments or communications would either be dangerous (in the case of declarations) or have indeterminate side effects (in the case of whether or not an assignment or communication happened).
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
You are free to have a select that records which choice happened, followed by a switch that let's cases share choice handlers.
-j