[Python-Dev] switch-based programming in Python
Greg Ewing
greg@cosc.canterbury.ac.nz
Fri, 09 Nov 2001 15:27:26 +1300 (NZDT)
"Eric S. Raymond" <esr@thyrsus.com>:
> I disagree. Such fallthrough is very useful when writing state machines,
> which is a significant part of the utility of a case statement.
It only handles a special case, though, where one
branch is a strict postfix of another. It's no use
if the factoring you want to do is any more
complicated.
Also, it's backwards to require you to explicitly
state where you *don't* want fallthrough, when it's
most often not what you want.
I'm about -100 on fallthrough.
Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury, | A citizen of NewZealandCorp, a |
Christchurch, New Zealand | wholly-owned subsidiary of USA Inc. |
greg@cosc.canterbury.ac.nz +--------------------------------------+