Why I don’t like the “Impl” suffix in code

A suffix is part of the name of a class. As it is part of the name, it should transfer some kind of meaning about the class’ function and its position in the application.

Sometimes, the suffix “Impl” is being used. Particularly, for situations where the class is part of some pattern, where two classes are mirroring each other, working together towards different external interfaces (for example, this could be the Factory or the Facade pattern).

I suppose that the syllable “Impl” should put emphasize on a property of the respective class. The question is, which one? One possibility might be that the class implements some critical piece of functionality.

There are two reasons why I think that the “Impl” suffix should not be used.

  • It is redundant – code should implement something, right? So why should we have to emphasize this fact?
  • It is overly generic – it does not describe any specific function or structural property of the class.

For these reasons, I think that the “Impl” suffix is useless.


This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s