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 to create an Adapter between two software (mech. simulation, non-cs). Assuming we have a class named ThatThing. I have to handle various vendor specific implementations. These versions don't have meaningful names (unlike eclipse helios, indigo etc.).

1. How should I name a class that should express version number?

I find class like ThatThing_3_6_Impl, ThatThing_3_7_Impl quite awkward.

share|improve this question
up vote 18 down vote accepted

Use a different package name.


This allows you to keep all the "things" for specific versions together.

Apache Commons Lang used this format when releasing their "version 3" rewrites.

Since you need to be able to reference both version in a single class, I would shorten the names to:


In your case, this seems to be descriptive enough, and it removes the ugly Impl and _'s.

share|improve this answer
This sounds good. I'll think about it. Though in the place that these versions come together, we need to use fully-qualified name for the references, right? – user802421 Aug 12 '11 at 14:32
How do they come together? Are you using dependency injection? Either way, to answer you question, yes. – Jeremy Heiler Aug 12 '11 at 14:34
They have many versions of data models that changes between releases. Some specific subsets of features are mixing together. No library support at all (e.g. no di, no codegen). This is history of 11 years software evolution :( . – user802421 Aug 12 '11 at 14:51
Sad. Is it possible that by having version37.ThatThing extend version36.ThatThing would relieve some of the pain? – Jeremy Heiler Aug 12 '11 at 14:52
Unfortunately, they are structurally different and need complex transformation. It's like bitmap and vector graphic. – user802421 Aug 12 '11 at 15:15

It doesn't matter a lot. Pick a convention that expresses everything you need it to express and stick with it.

You could use ThatThing3_6 for "That Thing 3.6".

share|improve this answer

Your Answer


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.