Suggestion - use local imports in Phobos

Steven Schveighoffer schveiguy at yahoo.com
Tue Jun 4 15:53:35 PDT 2013


On Tue, 04 Jun 2013 18:44:21 -0400, Andrej Mitrovic  
<andrej.mitrovich at gmail.com> wrote:

> On 6/4/13, Idan Arye <GenericNPC at gmail.com> wrote:
>>   1) "It's discouraging to pull in a megabyte of code bloat by
>> just trying to read a file into an array of bytes."
>
> Isn't this the linker's job? If nothing in an import is used, I would
> expect no code to be linked into the exectuable (well, except maybe
> module constructors..).

If the module contains static ctors, those may thwart any efforts by the  
linker.

-Steve


More information about the Digitalmars-d mailing list