Dynamic D Library

Nick Sabalausky a at a.a
Sun Jul 19 21:56:28 PDT 2009


"Benji Smith" <dlanguage at benjismith.net> wrote in message 
news:h3vmi3$ro9$1 at digitalmars.com...
> 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.
>

Sure, there are plenty of good uses for dynamic linking, thinks that may 
even require it, and D may have room for improvement in that area (and 
personally, I'm not saying anything about any particular type of linking 
being most preferable). It's just that for someone to suggest that dynamic 
linking is required for non-trivial apps in general or for modular code 
reuse in general is a bit absurd.





More information about the Digitalmars-d mailing list