This chapter contains the obligatory definitions for all statements that D defines. D builds on the C family’s look and feel—there’s
for, and others. However, there are a few new, interesting statements and tweaks on the existing statements. In case you are likely to get bored by the inevitable litany describing each statement in detail, here are some “deltas”—interesting bits original to D.
If you want to conditionally compile code,
static if (§ 3.4 on page 68) may be of interest. Its usefulness goes well beyond simple flag-directed customizations; if you use generic code in any capacity,
static if is an enormous boon. The
switch statement (§ 3.5 on page 71) looks and acts much like its C counterpart but works ...