Program size, linking matter, and static this()

Steven Schveighoffer schveiguy at yahoo.com
Fri Dec 16 14:13:48 PST 2011


On Fri, 16 Dec 2011 16:48:47 -0500, Adam D. Ruppe  
<destructionator at gmail.com> wrote:

> On Friday, 16 December 2011 at 21:28:03 UTC, Steven Schveighoffer wrote:
>> In short, dlls will solve the problem, let's work on that instead of  
>> shuffling around code.
>
> I wouldn't want to cripple either - put all the reflection
> info in the dll, but keep it sufficiently decoupled so the
> linker can strip it out when statically linking.
>
> The effort in decoupling most the code isn't great.

The only way I can think of to decouple it is to disable it with a  
compiler switch, since the compiler is the one including the info.

I envision a nasty world where libraries are built 4 ways, with two  
orthogonal factors -- dynamic vs. static, and reflection vs. no  
reflection.  Oh, hello visual C++, what are you doing here?

-Steve


More information about the Digitalmars-d mailing list