Lang. suggestion: auto-fallthrough and comparison shorthands

Frank Benoit keinfarbton at nospam.xyz
Sat Jul 1 04:27:19 PDT 2006


> These and other great ideas have been mentioned before. At best, these
> sort of improvements will not be worked on until after v1.0 has been
> released. However, the better semantics for switch is never going to get
> implemented 'cos it will scare away too many C/C++ people, even if those
> people would like to be more helpful. I think it has to do with the cost
> of porting C/C++ code to D.
> 
> 
> --Derek Parnell
> Melbourne, Australia

I don't think so. D is not C++. If a C++ programmer wants to have C++ he
will not change to another programming language.

A possibility to reduce the cost of porting C++ code, can be:
Make a warning for missing break or continue statement at the end of a
case. Then you can easily go through the code and correct the wanted
fallthrough statements.



More information about the Digitalmars-d mailing list