|
|
|
|
|
by h3r3tic
6070 days ago
|
|
That latter advantage is true, but D's "header" files are currently impractical. Creating them by hand is a major source of pain, greater than with C/C++. The automatic generation on the other hand is troublesome for at least two reasons: 1) It's very sensitive to the contents of .d files. For instance, It leaves the bodies of inline-able functions in, thus if you modify such a function in the .d file, it will again mean a change spill to the .di and modules importing it (directly and indirectly). Similarly if you just reorder the functions in a module or change a private constant. This could partially be mitigated by a sufficiently smart build tool that tracks symbol importing, aliasing and usage in order to infer the modules that need to be recompiled. Sadly, this is quite complex and no current tool does it at the moment. 2) It assumes none of the functions will be used at compile-time (by stripping away function bodies depending on whether they may be inlined), which forces you to stuff them all into compile-time-only modules. |
|