Best practice for dub registry package and module names

Ali Çehreli acehreli at yahoo.com
Sun Sep 4 01:52:11 UTC 2022


Let's say I have three modules that work together, which I want to 
register on dub: A, B, and C.

Although the most interesting one is C and A and B are used in its 
implementation, A and B can be registered individually as well and be 
used as C's dependencies.

I know package-less modules are more prone to name collisions; so I 
would like to give package names to these three modules.

Should the package name be the same as each module? a.a, b.b, and c.c?

Should the package be the author's name: acehreli.a, acehreli.b, and 
acehreli.c?

Should they somehow reflect what they do: storage.a, buffer.b, and cache.c?

What about module names? If the type is 'struct MyCache', should the 
module name be mycache, or my_cache, or my-cache?

What else?

Thank you,
Ali


More information about the Digitalmars-d-learn mailing list