Skip to content

Don't Impl, Do Imp

Updated:
3 min read

In this post, I’ll discuss a micro-optimization to an extremely repetitive naming suffix (a huge emphasis on “micro”!). One characteristic of being a self-taught developer is questioning many standards and conventions from the ground up, of course, at the expense of time.

One convention I’ve been following for a few years is using the "Imp" suffix instead of "Impl", the de-facto abbreviation for “Implementation” in software. You might wonder why I’d write an entire post about removing a single letter. Let me explain why "Imp" is now my default choice and why it’s worth considering.

The word 'Imp' written on paper, with an 'l' overflowing off the edge

The Use of "Impl"

The abbreviation "Impl" is common in many programming languages. It’s a good convention, widely understood by developers. However, I believe "Imp" is a better choice for a few reasons.

Why "Imp" instead?

It all boils down to that extra l character in "Impl"!

3. "Impl" is merely a historical choice.

This is the only reason it’s still being used. Since it’s used and known everywhere, consistency is a strong argument for sticking with it. However, the migration from "Impl" to "Imp" is subtle, can be done with a supervised Search & Replace, and is unlikely to break your code (unless your codebase relies on reflection that depends on implementation details, in which case, I wish you peace of mind!). The "Impl" suffix is a historical choice, not necessarily the best.

2. It doesn’t add any extra value or information.

Developers rarely misunderstand "Imp" as anything other than “Implementation”. It’s a widely understood abbreviation. The extra l doesn’t add value; it’s just an extra character to type.

1. It makes a big difference in pronunciation.

Clean Code

While I don’t believe Clean Code only consists of best practices, I do think this section is particularly valuable:

Use Pronounceable Names
Humans are good at words. A significant part of our brains is dedicated to the concept of words. And words are, by definition, pronounceable. It would be a shame not to take advantage of that huge portion of our brains that has evolved to deal with spoken language. So make your names pronounceable. If you can’t pronounce it, you can’t discuss it without sounding like an idiot. “Well, over here on the bee cee arr three cee enn tee we have a pee ess zee kyew int, see?” This matters because programming is a social activity…
Clean Code 1

With "Impl", whether in your mind or out loud, you naturally try to find a close pronunciation like "im-ple" or revert to its longer origin “implementation”, both of which are more energy/time consuming compared to the innocent "Imp".

Conclusion

I’ve substituted "Imp" for "Impl" in all my projects for a few years, and I’ve never had any issues. It’s a small change for the better, which makes a lot of sense to me. I’m not saying you should change all your "Impl" suffixes to "Imp" right now, before evaluating first!

Either commit to "Imp" 100% or stick with "Impl". Consistency is far more valuable than a single letter. But if you’re starting a new project or have the freedom to make this change, I highly recommend using "Imp" instead of "Impl".

References

Footnotes

  1. Martin, R. C. (2008). Clean Code: A Handbook of Agile Software Craftsmanship. Prentice Hall. Chapter 2, Meaningful Names.

Follow me if you enjoyed the article.