Re: output minimal .di files?

2012-01-16 Thread Adam Wilson
On Sun, 15 Jan 2012 03:53:05 -0800, F i L witte2...@gmail.com wrote: Given the code, test.d: import std.stdio; export void test() { writeln(Test); } compiled with: # dmd -lib -H test.d I end up with test.lib (good so far), and test.di: import std.stdio;

Re: output minimal .di files?

2012-01-16 Thread Jonathan M Davis
On Monday, January 16, 2012 00:14:02 Adam Wilson wrote: I'm assuming that your goal is to build either or static or dynamic libraries? If that is the case than you can assume that CTFE and inlining will not work anyways. This is an inherent limitation of libraries and not D. What D

Re: output minimal .di files?

2012-01-16 Thread Adam Wilson
On Mon, 16 Jan 2012 00:25:21 -0800, Jonathan M Davis jmdavisp...@gmx.com wrote: On Monday, January 16, 2012 00:14:02 Adam Wilson wrote: I'm assuming that your goal is to build either or static or dynamic libraries? If that is the case than you can assume that CTFE and inlining will not work

Re: output minimal .di files?

2012-01-16 Thread Alex Rønne Petersen
On 16-01-2012 21:08, H. S. Teoh wrote: On Mon, Jan 16, 2012 at 11:38:15AM -0800, Adam Wilson wrote: [...] I would say the main reason for using .h/.di files in libraries is that the library designer does not want his implementation public viewable. And in D, unlike C/C++, .di files are pretty

Re: output minimal .di files?

2012-01-16 Thread H. S. Teoh
On Mon, Jan 16, 2012 at 09:32:57PM +0100, Alex Rønne Petersen wrote: [...] I... don't think the error messages from expanding raw object code would be very pleasant to read, if you used a template incorrectly... [...] It doesn't have to be *executable* object code; the compiler may store extra

Re: output minimal .di files?

2012-01-16 Thread H. S. Teoh
On Mon, Jan 16, 2012 at 12:32:01PM -0800, Adam Wilson wrote: On Mon, 16 Jan 2012 12:08:53 -0800, H. S. Teoh hst...@quickfur.ath.cx wrote: [...] One way to implement this is to store template/inline function bodies inside the precompiled object files as extra info that the compiler loads in

Re: output minimal .di files?

2012-01-16 Thread Timon Gehr
On 01/16/2012 09:40 PM, H. S. Teoh wrote: On Mon, Jan 16, 2012 at 09:32:57PM +0100, Alex Rønne Petersen wrote: [...] I... don't think the error messages from expanding raw object code would be very pleasant to read, if you used a template incorrectly... [...] It doesn't have to be

Re: output minimal .di files?

2012-01-16 Thread H. S. Teoh
On Tue, Jan 17, 2012 at 12:17:18AM +0100, Timon Gehr wrote: On 01/16/2012 09:40 PM, H. S. Teoh wrote: On Mon, Jan 16, 2012 at 09:32:57PM +0100, Alex Rønne Petersen wrote: [...] I... don't think the error messages from expanding raw object code would be very pleasant to read, if you used a

output minimal .di files?

2012-01-15 Thread F i L
Given the code, test.d: import std.stdio; export void test() { writeln(Test); } compiled with: # dmd -lib -H test.d I end up with test.lib (good so far), and test.di: import std.stdio; export void test() { writeln(Test); } wtf? why is test() fully

Re: output minimal .di files?

2012-01-15 Thread Jonathan M Davis
On Sunday, January 15, 2012 12:53:05 F i L wrote: Given the code, test.d: import std.stdio; export void test() { writeln(Test); } compiled with: # dmd -lib -H test.d I end up with test.lib (good so far), and test.di: import std.stdio; export void

Re: output minimal .di files?

2012-01-15 Thread F i L
Jonathan M Davis wrote: http://stackoverflow.com/questions/7720418/whats-not-in-an-interface-file I see. Thanks again, Jonathan. I know this has been said before, but these sorts of explanations really should be part of the documentation.

Re: output minimal .di files?

2012-01-15 Thread Jonathan M Davis
On Sunday, January 15, 2012 11:16:51 H. S. Teoh wrote: On Sun, Jan 15, 2012 at 01:39:05PM +0100, F i L wrote: Jonathan M Davis wrote: http://stackoverflow.com/questions/7720418/whats-not-in-an-interface-f ile I see. Thanks again, Jonathan. I know this has been said before, but these