Readit News logoReadit News
jgdxno commented on Revisiting Interface Segregation in Go   rednafi.com/go/interface-... · Posted by u/ingve
the_gipsy · a month ago
Is this pattern commonly used? Any drawbacks?

Sounds much better than the interface boilerplate if it's just for the sake of testing.

jgdxno · a month ago
At work we use it heavily. You don't really see "a zillion interfaces" after a while, only set of dependencies of a package which is easy to read, and easy to understand.

"makes it hard to cone up with good names" is not really a problem, if you have a `CreateRequest` method you name the interface `RequestCreator`. If you have a request CRUD interface, it's probably a `RequestRepository`.

The benefits outweigh the drawbacks 10 to one. The most rewarding thing about this pattern is how easy it is to split up large implementations, and _keep_ them small.

Dead Comment

jgdxno commented on Type checking is a symptom, not a solution   programmingsimplicity.sub... · Posted by u/mpweiher
jgdxno · 3 months ago
I've always viewed type systems as adding constraints on and descriptions to the data and logic in the system.

Which is exactly what you find a ton of in electrical engineering (e.g. IEEE C37.2 and gazillion more).

u/jgdxno

KarmaCake day4September 5, 2025View Original