Doc Comments /
FAQ
Difference (previous author) (Change, Edit, normal page display)
Added: 10a11
|
![]() |
|
Comments
Add your comments here...
Why are executables so huge?
Fallthrough on switch statements
The reason D doesn't change this is ... to make code that looks the same as in C operate the same. If it had subtly different semantics, it will cause frustratingly subtle bugs.
This argument would only apply to an implicit break. If, like C#, D required you to write one of {break|return|throw}, there's no subtlety or surprise.
I'm not questioning the decision here - every once in a while fallthrough is really rather useful - just the rationale given.
- And there can even be a statement to indicate that you really do want a fallthrough. Moreover, it doesn't state what was wrong with replacing the switch syntax with something more structured - like
NG:D/22722. -- StewartGordon July 28, 2005 14:38 CET
More Information
Can I link in C object files created with another compiler?
Should mention a download link for coffimplib: http://ftp.digitalmars.com/coffimplib.zip
Why doesn't D have an interface to C++ as well as C?
For more reasons on why D doesn't "call some arbitrary C++ code that is presumed to be
unmodifiable", see Accessing C++ code from D.
Where can I get an IDE for D?
See also Editor Support for more tools for editing D source code.
Specification Page