Program size, linking matter, and static this()

Bane branimir.milosavljevic at gmail.com
Fri Dec 16 13:58:18 PST 2011


Andrei Alexandrescu Wrote:

> On 12/16/11 3:38 PM, Trass3r wrote:
> > A related issue is phobos being an intermodule dependency monster.
> > A simple hello world pulls in almost 30 modules!
> > And std.stdio is supposed to be just a simple wrapper around C FILE.
> 
> In fact it doesn't (after yesterday's commit). The std code in hello, 
> world is a minuscule 3KB. The rest of 218KB is druntime.
> 
> Once we solve the static constructor issue, function-level linking 
> should take care of pulling only the minimum needed.
> 
> One interesting fact is that a lot of issues that I tended to take 
> non-critically ("templates cause bloat", "intermodule dependencies cause 
> bloat", "static linking creates large programs") looked a whole lot 
> differently when I looked closer at causes and effects.
> 
> 
> Andrei

http://wiki.freepascal.org/Size_Matters

Otherwise a great language that never did manage to remove "bloated" factor from its name. Many people stopped using it because of that, including me. I guess people do not like bloat when programming systems stuff.



More information about the Digitalmars-d mailing list