Should I prefix package names with the name of my program?
H. S. Teoh
hsteoh at quickfur.ath.cx
Mon Jan 28 17:29:41 UTC 2019
On Mon, Jan 28, 2019 at 04:59:22PM +0000, Victor Porton via Digitalmars-d-learn wrote:
> Should I prefix all module names with `xmlboiler.` (where XML Boiler
> is the name of my program). These packages are expected to be used
> internally by my program, not as an exported API (however there are
> some little chances that in the future I will make a public API)
I won't pretend to speak for anyone else, but personally, I don't even
bother with packages until my code has grown past a certain size. It's
just useless cruft and needless complexity for small to medium sized
projects. It's only when you're planning to export a public API, or when
your code has grown past a certain size, that it becomes useful to
segregate the code into different packages.
So IMO you don't need to bother. You can always refactor the code later
to have a package name when you make a public API.
T
--
Famous last words: I wonder what will happen if I do *this*...
More information about the Digitalmars-d-learn
mailing list