Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have written a small open source Java library for facilitating conversions between different types of objects (in the style of Google's gson, but quite more general).

It seems to me that a nice natural name for my library is JConverter, after browsing in the web to see if another library with the same name already exists, I found a library with the same name for Joomla.

My concrete question is:

How important is to avoid naming collisions when creating an open source library if an existing library with the chosen name already exists in a complete different domain ? (in my concrete case, these are libraries even implemented for different languages).

share|improve this question

closed as primarily opinion-based by durron597, GlenH7, Snowman, MichaelT, gnat Jul 31 '15 at 10:21

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise.If this question can be reworded to fit the rules in the help center, please edit the question.

You mean your library name or your classes' name? – tia Oct 19 '13 at 14:31
the library name – Sergio Oct 19 '13 at 14:32
Anyone who has reason to use both libraries in a single project is likely to be unhappy with you. – Dan Pichelman Oct 19 '13 at 14:33
To clarify: This question is not about unique namespaces in Java, but about general naming of projects? (Java has a naming convention that produces globally unique names. Assuming you own the domain, then a suitable name would be com.yourlib.jconverter) – amon Oct 19 '13 at 14:42
yes, it is about the name of the project. Typically this also determines the name of the jar for the project. – Sergio Oct 19 '13 at 14:46
up vote 4 down vote accepted

I'm going to be heretical here and say: homonymy isn't a big problem.

Virtually every word you use in everyday language has more than one meaning. When you bother actually checking things in a dictionary, you'll find that often you know and understand several different meanings of words in a sentence. People are amazingly good at disambiguating such words without even being aware of it. As long as you don't pollute the Java class namespace with a domain you don't own, I see no reason to avoid a name because someone, somewhere has already used it. Virtually every nice name is already in use by that criterion. I would avoid a name only when it's in use for something that fills the same niche, so that contextual disambiguation wouldn't work. (This is largely how trademark law works, in fact.)

The greater problem is, as Donal said, that "JConverter" isn't a very descriptive name. You should either express something about the domain you serve with your library, or find a name that sounds interesting - maybe a proper name.

share|improve this answer

How important is to avoid naming collisions when creating an open source library if an existing library with the chosen name already exists in a complete different domain ?

It's pretty important, as otherwise you get lots of confusion. That particularly comes if you're lucky enough to grow the community of users to the point where there's some overlap between groups. For example, did you know there are several open source systems called Fedora? One's a major Linux distribution, and the other is a digital asset management system (and they used the name first, which led to an awkward trademark dispute a number of years ago). When I encountered a project using both earlier this year, I spent a significant proportion of time trying to grasp just WTF was going on!

So avoid such problems. Pick a more distinctive name. (I don't think that JConverter is very good BTW; it's not saying what it converts. Is it converting images? Or sound formats? Or maybe it's converting weights and measures between metric and imperial.)

Technically, if you're using a system like Maven then you won't have that much trouble as you'll have different groupIds and different package names. If you don't do at least that much separation, you're just asking for trouble!

share|improve this answer

Considering one library is for Java and the other for Php, and that there are no trademarks involved. I wouldn't break a sweat.

That said, you are going to compete to get the best URLs on GitHub, etc. If this is not a problem, go ahead.

On the other hand, maybe you can figure out a unique name and be done with it? :-)

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.