Dynamic D Library

Benji Smith dlanguage at benjismith.net
Sun Jul 19 10:52:54 PDT 2009


Nick Sabalausky wrote:
> "BCS" <ao at pathlink.com> wrote in message 
> news:78ccfa2d4382d8cbd4ffb8875fdf at news.digitalmars.com...
>> Reply to teo,
>>
>>> Well, to some extent this will do the job, but at some point you would
>>> need to extract some stuff and put it in libraries, so that it can be
>>> reused by other applications. Think about an application which
>>> consists of several executables which work together and should share
>>> common stuff. Wouldn't you extract it into a library?
>>>
>> Yes, as a static .lib type library that is statically linked in as part of 
>> the .exe.
> 
> Exactly, and it doesn't even have to be a compiled .lib, it could just be a 
> source-library. I do that all the time. I really don't see any reason to 
> think that modularity and code-reuse would require linking to be dynamic. At 
> least certainly not in the general case.

I agree that source-level modularity, and static linking are preferable 
most of the time (especially given D's dependency on templates, which 
don't work so well in compiled libraries).

But there are plenty of legitimate situations that mandate dynamic 
linking, and I think the standard library needs a better solution than 
what it currently has.

--benji



More information about the Digitalmars-d mailing list