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?
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++)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With