Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

D Build Process

How does the process of building (compiling and linking) source code in D differ from C/C++ especially with regards to inline functions, D's module system (instead of headers) and build tools. How are template instantiations reused in D?

like image 758
Nordlöw Avatar asked Jan 07 '13 21:01

Nordlöw


1 Answers

it doesn't differ that much, each module gets compiled to its own obj file which then gets linked together which IIRC isn't that different from C/C++ process

the main difference however lie in that the imports are symbolic instead of C's whole file #include which eliminates the need to headerfiles (though the option for headerlike .di files is there for closed source APIs)

the templates indeed need to be included in the files available to the compiler though (like they need to be in the header for C++)

like image 101
ratchet freak Avatar answered Sep 30 '22 12:09

ratchet freak