[thelist] CFswitch doesn't.
Matt Warden
mwarden at gmail.com
Fri Aug 12 20:30:20 CDT 2005
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Jeff Howden wrote:
> specify list delimiters in a case statement in a cfscript block, and for
> other reasons we'll probably never know, they probably decided to follow the
> standards other languages employ when it comes to multiple case statements
> and explicit breaks, rather than passing a list of values. For example, the
> following:
...
> <cfscript>
> switch(foo)
> {
> case 'boo':
> case 'bar':
Which I've always found quite ridiculous. The extra effort ought to be
necessary for the exceptions (like the above, which I personally
rarely ever see in code; I assume because it's not very readable), not
the general use case. e.g., it'd be nice if the above needed something
like this:
switch(foo)
{
case 'boo':
continue;
case 'bar':
foo()
case ...
}
where the break is implicit unless 'continue;' is used.
So, even though it obviously causes some confusion, I certainly can't
fault the CF authors for trying to make it more intuitive.
- --
Matt Warden
Miami University
Oxford, OH, USA
http://mattwarden.com
This email proudly and graciously contributes to entropy.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFC/U0sAQ0d4HGyPE8RAvxVAJ9qPt96tvVVXbiNGUCs070XwYuwSgCfYeDo
vzQz6Eq5FpWhF0rhAZQr7L4=
=trB6
-----END PGP SIGNATURE-----
More information about the thelist
mailing list