<div class="gmail_quote">On Fri, May 4, 2012 at 1:46 PM, foobar <span dir="ltr"><<a href="mailto:foo@bar.com" target="_blank">foo@bar.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="im">On Friday, 4 May 2012 at 18:30:32 UTC, Andrej Mitrovic wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
On 5/4/12, foobar <<a href="mailto:foo@bar.com" target="_blank">foo@bar.com</a>> wrote:<br>
</div><div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The di files are mostly meant to be machine read (e.g. the<br>
compiler) and this belongs as part of the library file in order<br>
to provide ease of use and maintain the relationship between the<br>
binary code and it's interface.<br>
<br>
maintaining two sets of files that could easily get out of sync<br>
and *not* using the docs is way more insane.<br>
<br>
</blockquote>
<br></div><div class="im">
I'd say the docs are more likely to be out of sync than .di code. If<br>
the .di code is really out of sync you'll likely even get linker<br>
errors. And not everything ends up being documented.<br>
<br>
And then what about existing tools like IDEs and editors. E.g.<br>
autocomplete wouldn't work anymore.<br>
</div></blockquote>
<br>
I'd say you'd be wrong.<br>
Both di and docs are auto-generated from the same source.<br>
As I said docs are designed for human consumption. This includes all sorts of features such as a table of contents, a symbol index, the symbols should have links, the docs provide usage examples, etc, etc.<br>
Docs can be put online thus ensuring they're always up-to-date.<br>
<br>
Tools should either read the data from the lib file or retrieve it from the web. Keeping separate local di files is simply insane.<br>
<br>
And really, have you never heard of Java? How about Pascal?<br>
Should I continue back in history to all the languages that implemented this feature decades ago?<br>
C/C++ is a huge PITA with their nonsense compilation model which we shouldn't have copied verbatim in D.<br></blockquote><div><br></div><div>I like the idea, but what about templates? For them, you'd basically be stuffing source code into the object files (unless you came up with a way to store the AST, but that seems like the effort/benefit ratio wouldn't be worth it since we currently have no way to preserve an AST tree between compiler runs).</div>

<div>Otherwise, I find this idea very compelling. I'm sure there are probably other issues, though. </div></div><br>