Always wanted a switch coding style. Now, offered one i am having second thoughts introspecting if my code improves for readability if I use one. I think on balance yes. I've always like this approach to a single value or expression gating choices.<p>Also wondering about the degenerate forms of fall through alternates, so it's a stack of code optionally run.<p>There is another link to c code switches and duffs device in hn recently
Wow I love this. This is one of my favorite features of Rust/OCaml (along with variant types / data-bearing-enums).<p>I think the latter would help a lot with error handling in particular, not to mention defining protocols.
See also the PEPs: <a href="https://www.python.org/dev/peps/pep-0634/#abstract" rel="nofollow">https://www.python.org/dev/peps/pep-0634/#abstract</a>