Michel Fortin wrote:
On 2010-05-07 13:55:34 -0400, Walter Bright <[email protected]>
said:
Source code could look something like:
import http.d_repository.foo.version1_23;
and the compiler could interpret "http" as meaning the rest is an
internet url, foo is the package name, and version1_23 is the
particular version of it.
So now, each time a new version of a library pops up you need to
search-replace the version number for all your source code, and source
code of other library you depend on? This is insane.
The version number shouldn't be there, except perhaps if it's a 'major'
version number full of breaking changes.
If you leave the version number off, it gets the latest version. If you put it
on, it reliably stays the same. I don't see an issue.
Also, putting in the source code the location or protocol to fetch the
repository isn't much better. There's a reason we have a module import
path: so that finding external code depends on compile-time
configuration, not on the actual code you build.
It's a good point, but I think it's a detail.
Allowing URLs in the import path might be an interesting idea though.