Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

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
    
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
3  
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 yourlib.com, 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

3 Answers 3

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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