Deimos: Consistent structure?

Jude Young 10equals2 at gmail.com
Sun Nov 20 23:56:43 PST 2011


On Mon 21 Nov 2011 01:42:54 AM CST, Kapps wrote:
> This seems the obvious choice to me. Something like "import
> ncurses.util" seems natural and, well, package based.
>
> On 21/11/2011 1:31 AM, Jacob Carlborg wrote:
>> 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.
>>
>
>

Yeah that's the exact same thing I was thinking.
Unless There is some reason that this will not work, It feels like 
making a mountain out of a molehill...

It would be great if there was a standard, but either way it's 
completely workable.


More information about the Digitalmars-d mailing list