News for hackers. Stuff that matters.
Re:How to Use Go Interfaces by yegle on Tuesday March 20, 2018 @01:45AM (#16626290)
Why would you think struct and interface should be treated the same? To me the fact a struct can implement multiple interfaces means they are not on the same "layer" of abstraction.
Re:How to Use Go Interfaces by hota_mazi on Friday March 23, 2018 @06:23PM (#16663118)
Imagine a struct with functions that don't have an implementation: that's an interface.

If it has some implementations and some without, it's an interface with default implementations.

See how Kotlin does it, it's really nice and consistent, and you never need to agonize over the decision of picking a class or a struct.