News for hackers. Stuff that matters.
Re:How to Use Go Interfaces by keypusher on Tuesday March 20, 2018 @07:32PM (#16633826)
> I specifically mention that it's not a great idea. It's a code smell. Instead, interfaces should be defined at point-of-use.

You still have not said WHY it's not a great idea, or what the benefits of defining the interfaces at point-of-use are.

Re:How to Use Go Interfaces by chewxy on Tuesday March 20, 2018 @07:40PM (#16633866)
The benefits of defining interfaces at point of use is decoupling of dependencies.

Imagine you have two packages: A and B. A defines interface Fooer and struct FooThing. Package B only requires anything that can call Foo(). But because the interface is defined at A, now B is forever tied to A. When you change something in A, you have to worry if it changes something in B as well.

If instead the interface Fooer is defined in B, package A can change as much as it likes without B needing to change.