Proposal for a standard for D library naming

Gregor Richards Richards at codu.org
Sun Sep 24 17:33:46 PDT 2006


Derek Parnell wrote:
> On Sun, 24 Sep 2006 17:14:06 -0700, Gregor Richards wrote:
> 
> 
>>Derek Parnell wrote:
>>
>>>You still seem to be saying that the *only* place that module ought to
>>>reside in is in libraries.
>>
>>Aha!  This is a core misunderstanding.  All of this library stuff is 
>>supposed to come well after failing to find it in an object file - the 
>>order in my head is: source files, object files, specified libraries, 
>>automatically-discovered libraries.  That is, it should FIRST look for 
>>source, then objects, and only if failing in both of those should it 
>>look at libraries - libraries are solely for things that are NOT 
>>included with the source!
>>
> 
> 
> Ok! So the example should be more like ...
> 
> Example:
>    import a.b.c;
>  
> Looks for 
>     a.b.c.o
>     libD.a.b.so
>     libD.a.b.a
>     libD.a.so
>     libD.a.a
>  
> and places the first one it comes across onto the linker command line. If
> it finds none of these, or finds that the source is more recent, it will
> compile a.b.c.d to form an object file.
> 

Exactly!  Using libraries isn't supposed to /replace/ using source or 
already-compiled object files, it's supposed to be an adjunct - in many 
cases, it's just inconvenient to use object files or source, and of 
course there's the possibility of proprietary software in which a 
library is clearly the superior method.  Obviously, if you included the 
source by some means, you intend to use them - otherwise, libraries are 
probably more useful.

  - Gregor Richards



More information about the Digitalmars-d mailing list