I would like "xrchz"... (on the off chance that I write a library
worth sharing).

On Mon, Jun 1, 2009 at 10:31 AM, Derick Eddington
<[email protected]> wrote:
> Hello everyone,
>
> If you haven't been doing so already, you need to name your libraries
> under unique namespaces, to avoid conflicts.  It is important and easy.
> It is important because it allows everyone's libraries to coexist.  It
> allows everyone's libraries to be in the same search paths, and it
> allows unforeseen combinations of importing arbitrary people's libraries
> into the same program.
>
> For examples, I'm going to show some of Eduardo Cavazos's library names,
> because he's been making many good libraries but currently they're not
> named under unique namespace(s), and this could become a major headache.
> He has library names such as (color rgba), (math basic), (misc
> list-stack), (geometry pt), and (cfdg).
>
> But what if someone else wants to use these names?  How are we going to
> use everyone's libraries which are named the same?  We'd be required to
> have separate search paths for everyone and we'd be required to always
> be reconfiguring the active search paths depending on whose same-named
> libraries are needed.  This alone is a major headache and enough to
> discourage use of such libraries.
>
> But there's an even worse problem: such libraries cannot be used by the
> same program, because they're named the same.  What if we want a program
> to import some (acme foo) library which directly or transitively imports
> someone's libraries and we also want the program to import some
> (xyz bar) library which imports someone else's libraries, at least one
> of which has the same name as the other person's.  It's impossible.
> This is not good.  It is very bad.
>
> It's for these two reasons that I tell people to claim at least one
> unique namespace to put their libraries under.  It's really easy and
> well worth it.  If we all don't use unique namespaces, we're going to be
> kicking ourselves.  So watch out!  If I see you naming libraries (which
> are not throw-away examples) without a unique top namespace, I'm going
> to bug you about this.
>
> I also say that ports and interfaces (e.g. FFI or IPC) of others' things
> should always be under a unique namespace of whoever made the port or
> interface library.  Because someone else very well may want to make
> their own port or interface of the same thing but their's is not going
> to be exactly the same, and so in order for these libraries to coexist,
> they need to be under unique namespaces.  E.g., IMO, only the OpenGL or
> GTK projects have the right to use (gl ---) or (gtk ---).
>
> So:
>  (generic thing)
> should be:
>  (think-of-unique-project/personal-name generic thing)
>
> Please do this, else I'll crack your repositories and rename your
> libraries for you, and you won't like the names I choose :)  In the time
> it took me to write this, everyone could have claimed their namespaces
> and typed them 100 times.  We could even have namespace-choosing
> parties, and we could probably get some of those girls who have parties
> for certain products to come over if we tell them they can name their
> products too.
>
> Thanks,
>
> --
> : Derick
> ----------------------------------------------------------------
>
>

Reply via email to