logoalt Hacker News

WalterBrighttoday at 5:06 AM0 repliesview on HN

D is an elegant re-imagine of C and C++. For a trivial example,

    typedef struct S { int a; } S;
becomes simply:

    struct S { int a; }
and unlike C:

    extern int foo();
    int bar() { return foo(); }
    int foo() { return 6; }
you have:

    int bar() { return foo(); }
    int foo() { return 6; }
For more complex things:

    #include <foo.h>
becomes:

    import foo;