DEV Community

loading...

Discussion on: The Problem with Interfaces, and how Go Fixed it

Collapse
dean profile image
Dean Bassett Author

Really the main point I was trying to make is that code from other libraries can be easily used in code you make. If you bring in a library which supplies an HttpRequest, and you have an interface called Requester which has a Request() method, as long as HttpRequest has the Request() method, it conforms to the Requester interface and can be used where you'd want it to be used.