Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yes, it's semantically C-compatible. They're close enough that converting C code to D code manually is straightforward. But it isn't necessary to do that, you can simply import C code into D code:

    // D code

    import mycstuff; // loads mycstuff.c
    int main() {
        int* p = mycfunction(); // call C function
        return *(p + 1);  // pointer arithmetic
    }


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: