Im­prove this page Quickly fork, edit on­line, and sub­mit a pull re­quest for this page. Re­quires a signed-in GitHub ac­count. This works well for small changes. If you'd like to make larger changes you may want to con­sider using local clone. Page wiki View or edit the com­mu­nity-main­tained wiki page as­so­ci­ated with this page.

The D pro­gram­ming lan­guage. Mod­ern con­ve­nience. Mod­el­ing power. Na­tive ef­fi­ciency.

DConf 2013 is sched­uled for May 1-3 in Menlo Park, Cal­i­for­nia. Visit the con­fer­ence web­site for more de­tails in­clud­ing how to pro­pose a ses­sion.

[your code here] Got a brief ex­am­ple il­lus­trat­ing D? Sub­mit your code to the dig­i­tal­mars.D forum spec­i­fy­ing "[your code here]" in the title. Upon ap­proval it will be show­cased on a ran­dom sched­ule on D's home­page.
#!/usr/bin/env rdmd
// Computes average line length for standard input.
import std.stdio;

void main() {
    ulong lines = 0;
    double sumLength = 0;
    foreach (line; stdin.byLine()) {
        ++lines;
        sumLength += line.length;
    }
    writeln("Average line length: ",
        lines ? sumLength / lines : 0);
}
D is a lan­guage with C-like syn­tax and sta­tic typ­ing. It prag­mat­i­cally com­bines ef­fi­ciency, con­trol, and mod­el­ing power, with safety and pro­gram­mer pro­duc­tiv­ity.

Con­ve­nience

Power

Ef­fi­ciency

Forums | Comments | Search | Downloads | Home