How to complex switch?

matthew ong ongbp at yahoo.com
Thu May 12 05:04:22 PDT 2011


Hi KennyTM~,

Some of the valid reason:
1) Less key stroke
2) Easier code generator to implement
3) Better to read.
4) less worries about braket '{'.
5) ....

In Java, C++ we avoided using switch because it ONLY support const & literal type.

Most script base language supports things like this. I believe bash shell script
does. Since D aimed to be a next generation language,
I suppose that should be in with fall through also.



More information about the Digitalmars-d mailing list