On 2011-11-21 20:14, Walter Bright wrote:
On 11/20/2011 11:31 PM, Jacob Carlborg wrote:
Say that both liblzma and ncurses have a module called "util". What
happens if I
want to use both of these libraries in the same application. When I do
"import
util;" which one will the compiler pick?
import liblzma.util;
import ncurses.util;
I suggest there is a root package named after the library. If people
want a
deimos package, that's fine with me as well. But there has to be a
package named
after the library where all modules should be located, except for,
possibly, a
module that imports the whole library.
That already is so. What I objected to was:
No it's not. Have a look at the curses module in the ncurses repository.
https://github.com/D-Programming-Deimos/ncurses/blob/master/curses.d
It has the following module declaration: "module curses;", which means
it will conflict with any other library the has a module with the same name.
import liblzma.D.util;
as pointless.
Yeah, that D package won't to anything good.
--
/Jacob Carlborg