Library standardization
e-t172
e-t172 at akegroup.org
Sat Apr 19 06:12:35 PDT 2008
Bill Baxter a écrit :
> See Janice's comments. .di files contain the implementation of
> templates and of functions that will be inlined. These things must be
> in the header file to work. They do not contain all implementation as
> you suggest. Or at least they're not supposed to.
Okay, I didn't know that. So .di files address the issue, I guess.
However, there are three remaining problems with the way .di files are
generated:
- Like you said, indentation is stripped. This make .di files quite
ugly. Considering that .di files will often be directly read by the user
of the API, this is a problem.
- There should be some kind of feature to automatically copy the
"documentation comments" (ddoc, doxygen, etc) from the .d files to the
.di files when they are generated. A solution would be to automatically
include all comments which are not in implementation code.
- If I understand your statement correctly, it means the D compiler
decides on its own whether to inline a function or not. I don't think
it's a good idea, because it will lead to very strange problems and
unexpected behaviour when dealing with shared libraries. (actually this
is not a .di issue, but a more general one).
More information about the Digitalmars-d
mailing list