[deimos] [tutorial] [rfc] How to set up a git repository to simplify keeping bindings up to date

Andrej Mitrovic andrej.mitrovich at gmail.com
Fri Nov 11 14:57:50 PST 2011


It seems to me that people already use arbitrary ways of naming
modules, IOW the deimos idea is becoming a mess:

module deimos.libsndfile.d.sndfile;
https://github.com/dawgfoto/deimos/blob/master/libsndfile/deimos/sndfile.di

module ncurses;
https://github.com/1100110/deimos-1/blob/master/ncurses/D/ncurses.d

module deimos.lzma;
https://github.com/jpf91/deimos/blob/liblzma/liblzma/deimos/lzma.d

Personally I think naming modules "deimos.modulename" is a bad idea.
What if you want to use two C libraries in a single app which both
define a module with the same name?

import deimos.tests;  // wanted lib1.tests
import deimos.tests;  // wanted lib2.tests, woops!

If deimos was just a directory name and not included in the module
name we could have this sort of directory tree:

/deimos/lbzma/file.di
/deimos/lbzma/c/file.h
/deimos/gtk/file.di
/deimos/gtk/c/file.h
/deimos/cairo/file.di
/deimos/cairo/c/file.h

The modules would be named as:
module lbzma.file;
module gtk.file;
module cairo.file;

And then the only thing you would have to do to start using any of
these is add -I<path_to_deimos> to your projects, and you wouldn't
have name clashes if you used more than one library.


More information about the Digitalmars-d-announce mailing list