Reputation: 12138
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?
Upvotes: 6
Views: 209
Reputation: 48226
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++)
Upvotes: 2