Java interface and implementation naming (or “I” or “Impl”)

How do I name my interfaces and the classes that implement my interfaces? Through much research on the internet and my own gut feelings, this is what I reckon:

I never prefix my interfaces with “I”. The value of coding to interfaces is that you can swap out the implementation with minimal hassle. It means that instead of using implementation specific class names in your code, you use interface names instead – right? So, if I’m going to be using interface names everywhere, I don’t want to have to prefix everything with “I”. Coding to interfaces is a best practice, so I don’t need to explicitly state that I am doing it…It should just happen – which makes the “I” prefix redundant.

Furthermore, the “Impl” suffix is also redundant. Yes, indeed, your dilemma isn’t as simple as picking between the two. Firstly, “Impl” doesn’t translate. “Impl” in other languages has no meaning, and yes I’m talking about Polish and Scala. In Polish (according to Google translate), “implementation” is “realizacja” and in Scala, there are no interfaces. The closest thing Scala has to interfaces is traits, which can contain implementation specific code. So really, everything is Scala is an implementation, so why you use “Impl” suffix?

Secondly “Impl” is restrictive. What happens when you want to add another implementation of Foo? You gonna call it “FooImplImpl”? “AnotherFooImpl”? “FooImpl2″? I didn’t think so. Perhaps you were going to just call it “FooImpl” and put it in a different package…

Thirdly “Impl” doesn’t convey any meaning about what the implementation is. You wouldn’t create an “AnimalImpl” would you? You’d create a “Lion” or an “Elephant”. There is almost always something that distinguishes your implementation that you can use in the class name. Even if it is a long name, it doesn’t matter – you’re coding to interfaces (remember?), so you’re rarely going to see that class name.

Lastly, and probably most importantly – you still can’t think of a name? You don’t need an interface. If you really can’t think of a name, your class must be generic enough to not need an interface and you’re probably not going to have any other implementations. Your class methods become the interface contract, and that is that.

3,252 thoughts on “Java interface and implementation naming (or “I” or “Impl”)

  1. Listen guys Ive been browsing the blog recently and I finally wanted to drop some of my thoughts. For starters it seems to me that most players frequently overlook how crucial it is to have strict budget control something that absolutely defines the long-term journey. Furthermore platforms lately look way more dynamic and thus one have to be careful. Anyway I found an helpful guide https://free-chickenroad-8.vercel.app which shares some cool insights on ways to improve your chances. On top of that I feel that recovering losses is the fastest method to lose your balance which is why you should remember when to call it a day. What do you think on this? Lets discuss below

  2. Darmowe spiny bez depozytu 2026 alko ruletka onlinektore kasyno online najlepszeamerican blackjack online

  3. Casino Online Polska czy kasyno buddy jest legalnebest casino bonusesnovomatic sizzling hot deluxe

  4. п»їWyplacalne kasyna internetowe hell spin bonus bez depozytuvulkan vegas comluckera darmowe spiny

  5. Listen friends Ive been reading the thread for a few weeks and I just wanted to contribute some of my views. As a side note Ive noticed that most punters always overlook the importance of good money discipline which really makes or breaks the overall results. Also casinos these days seem much more unpredictable and thus you really must to watch out. Anyway I found an helpful guide https://game-chickenroad-3.vercel.app which offers some great tips for improve your chances. It’s also true that chasing bad runs is a surefire path to go broke which is why you should know when to stop. How do guys handle bad beats? Share your experience in the comments

  6. Najlepsze nowe kasyna online legalne polskie kasynalista legalnych kasyn w polscesalon gier pЕ‚ock

  7. Najlepsze nowe kasyna online casino x bonus bez depozytuplay fortuna 100 free spinsergo hestia wypЕ‚ata odszkodowania opinie

  8. Darmowe spiny bez depozytu 2026 kasyno internetowe paysafecarduniqa wyplata odszkodowania forumgg bet kod promocyjny bez depozytu

  9. п»їWyplacalne kasyna internetowe bonus bez depozytu w kasynie1win casino opiniespin city bonus za rejestracjД™

  10. Casino Online Polska darmowe spiny za rejestracjД™ bez depozytu uknajlepsze kasyno bez depozytu20 free spins bez depozytu

  11. Darmowe spiny bez depozytu 2026 nowe kasyna bonus za rejestracjД™ukЕ‚ad w pokerzedarmowe spiny vulkan vegas

  12. Casino Online Polska casino bonus za rejestracjezaklady bukmacherskie bez dowodukod promocyjny lotto

  13. 100zl bez depozytu za rejestracje fireball casino darmowe spiny bez depozytugdzie mozna wygrac kasesloty co to

  14. Я всегда говорил и продолжаю говорить: человек который не умеет говорить никогда не сможет стать по-настоящему успешным. Можно обладать знаниями талантами опытом можно быть прекрасным специалистом но если ты не умеешь доносить свои мысли до людей — ты проиграешь тем кто умеет влиять убеждать и вести за собой. Роман Василенко кооператив Бест Вей Именно поэтому я создал свою лекцию «14 правил риторики». Это не просто теория об ораторском искусстве. Это система которую я выстраивал годами через практику бизнеса переговоров публичных выступлений и работы с огромными аудиториями. Всё о чём я говорю в этой лекции прошло через реальную жизнь через сцены конференции переговорные комнаты и многотысячные залы. Роман Василенко блог о лидерстве Для меня риторика — это не умение красиво разговаривать. Риторика — это инструмент влияния. Это способность управлять вниманием людей вдохновлять убеждать мотивировать и формировать доверие. Великие лидеры всегда были великими ораторами. История не знает людей которые изменили мир оставаясь молчаливыми и незаметными. Роман Василенко жилищные кооперативы Почему я считаю риторику главным навыком успеха Роман Василенко публичные выступления Сегодня огромное количество людей недооценивают силу слова. Многие думают что достаточно просто знать своё дело. Но правда жизни заключается в том что побеждает не тот кто знает больше всех а тот кто умеет донести свою мысль и зажечь ею других людей. Роман Василенко бизнес-мышление https://pretich.ru/viewpage.php?page_id=512 Роман Василенко публичные выступления

  15. 100zl bez depozytu za rejestracje kasyno online szwajcariajak odzyskać hasło do gmailakasyno bez depozytu za rejestracje 2026

  16. Darmowe spiny bez depozytu 2026 mobile legends poradnikonline casino nzgry w lotto

  17. Najlepsze nowe kasyna online sloty bonus bez depozytutotal casino awaria dzisiajkasyno pЕ‚atnoЕ›Д‡ sms

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>