Ask HN: Experience with Go Lang Interfaces

https://news.ycombinator.com/item?id=32375341
by yonisto • 4 years ago
2 5 4 years ago

I wonder how well go interfaces are working for you in regards to the fact that a type doesn't declare the interface it implements (like in many other languages).

8 years a ago I worked on a 50kloc project and it doesn't seem to matter this way or the other. I didn't find it useful nor did I find it harmful (since then I moved to work in other languages). Then I had the feeling that if the project needed a massive refactor it would really introduce bugs that wouldn't happen elsewhere. But that assumption never got to be tested.

Do you have a battle story regarding go's interfaces? did it save you? did it introduce bugs?

Thanks,

Related Stories

Loading related stories...

Source preview

news.ycombinator.com