Revisiting interface segregation in Go
rednafi.com·1d·
Flag this post

Object-oriented (OO) patterns get a lot of flak in the Go community, and often for good reason.

Still, I’ve found that principles like SOLID, despite their OO origin, can be useful guides when thinking about design in Go.

Recently, while chatting with a few colleagues new to Go, I noticed that some of them had spontaneously rediscovered the Interface Segregation Principle (the “I” in SOLID) without even realizing it. The benefits were obvious, but without a shared vocabulary, it was harder to talk about and generalize the idea.

So I wanted to revisit ISP in the context of Go and show how [small interfaces](https://go.dev/doc/effective_go#interfaces_and_types:~:text=Interfaces%20with%20only%20one%20or%20two%20methods%20are%20common%20in%20Go…

Similar Posts

Loading similar posts...