# Avoid Interface Pollution

DevFeed: [Avoid Interface Pollution](<https://devfeed.tech/articles/avoid-interface-pollution-22115.md>)

Original publisher: [Read original article](<https://www.ardanlabs.com/blog/2016/10/avoid-interface-pollution.html>)

Published: 2016-10-21T00:00:00Z

Content type: tutorial

Language: en

Sources: [William Kennedy](<https://devfeed.tech/sources/william-kennedy.md>)

Topics: [Code](<https://devfeed.tech/topics/code.md>), [interfaces](<https://devfeed.tech/topics/interfaces.md>)

Tags: [ardan-labs](<https://devfeed.tech/tags/ardan-labs.md>), [blog](<https://devfeed.tech/tags/blog.md>), [code](<https://devfeed.tech/tags/code.md>), [code-reviews](<https://devfeed.tech/tags/code-reviews.md>), [decoupling](<https://devfeed.tech/tags/decoupling.md>), [factory-function](<https://devfeed.tech/tags/factory-function.md>), [go](<https://devfeed.tech/tags/go.md>), [go-programming](<https://devfeed.tech/tags/go-programming.md>), [golang](<https://devfeed.tech/tags/golang.md>), [implementation](<https://devfeed.tech/tags/implementation.md>), [interface](<https://devfeed.tech/tags/interface.md>), [programming](<https://devfeed.tech/tags/programming.md>)

## AI overview

The article explains interface pollution: declaring interfaces unnecessarily, especially when an interface duplicates a concrete type's entire API. It identifies warning signs and recommends using interfaces when callers need to provide implementations, multiple internal implementations exist, or decoupling from identified changes is necessary.

## Source excerpt

Introduction Interfaces should only be used when their added value is clear. I see too many packages that declare interfaces unnecessarily, sometimes just for the sake of using interfaces. The use of interfaces when they are not necessary is called interface pollution. This is a practice I would like to see questioned and identified more in code reviews. Code Example Let's look at a code example that contains questionable design choices that raise flags for interface pollution.