Deimos: Consistent structure?

Jacob Carlborg doob at me.com
Sun Nov 20 23:31:32 PST 2011


On 2011-11-20 22:52, Jude Young wrote:
> On Sun 20 Nov 2011 02:20:18 PM CST, David Nadlinger wrote:
>> Hey all,
>>
>> currently, the 0mq and ncurses Deimos bindings place their modules in
>> the root (both package- and directory-wise), while the liblzma ones
>> use deimos.lzma and deimos.lzma_.*.
>>
>> The actual choice probably doesn't matter at all, but could we maybe
>> pick one and then stick to it (including appropriate documentation of
>> this decision, of course)? In my eyes, consistency would improve the
>> "Just Works"-appeal of Deimos by quite a bit.
>>
>> Thanks,
>> David
>>
>
> I asked Walter about it and he preferred the modules in the root.
> Another guy claimed it would lead to namespace clashes but refused to
> elaborate.
>
> There is a lot about Deimos that isn't documented.
> It'll get there.

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?

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.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list