Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The only advantage Go interfaces have over interfaces in other languages, is that you can make third party code comply to a given interface if you're lucky enough to have the same set of methods available.

Even then, you might hit the issue that although the interface matches syntactical, the semantic meaning of the method calls differs.

For the CS folks, Go interfaces are nothing more than structural typing, available almost any FP language.

The only advantage over Java, C#, D is that you are not required to state explicitly which interfaces a given type implements.

However this forces you to use tools to discover which interfaces a given type implements.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: