DIP11

Steven Schveighoffer schveiguy at yahoo.com
Fri Aug 12 06:53:37 PDT 2011


On Fri, 12 Aug 2011 05:12:47 -0400, Jacob Carlborg <doob at me.com> wrote:

> On 2011-08-12 00:42, Martin Nowak wrote:
>> It really looks sound to me.
>>
>> ---
>> module myfile;
>> pragma(imppath, "dep=www.dpan.org/dep");
>> import dep.a;
>> ---
>>
>> remote file
>> ---
>> module dep.a;
>>
>> // link directives
>> pragma(libpath, "dep=www.dpan.org/dep");
>> pragma(lib, "dep");
>>
>> // or alternatively some new pragma like this to cause linking the
>> imported package
>> pragma(build, "dep")
>>
>> // additional dependency
>> pragma(imppatch, "dep2=www.dpan.org/dep2");
>> ---
>>
>> Versioning can be easily resolved by using urls like
>> www.dpan.org/dep?version=0.45 or www.dpan.org/dep-greaterthan-0.45.
>>
>> Pro:
>> - scales from local dependencies to VPN sharing to package websites to
>> even dynamically generated source code
>> - simple implementation compilerwise
>
> We will be very dependent on Walter or anyone else that knows the  
> compiler, which, as far as I know, are quite few. I'm not sure if  
> anything _is_ simple in the compiler.

This is not true.  The compiler implements *hooks* for a download tool.   
The download tool will be a separate process which turns urls (generated  
by the compiler) into source files.  Once the hooks are implemented, the  
tool is independent, and we would be idiotic not to implement it in D.

I think you may not have read the DIP fully, or it is not clear enough.

-Steve


More information about the Digitalmars-d mailing list