PLAY PODCASTS
Generic interfaces: When to Use Them

Generic interfaces: When to Use Them

Programming Tech Brief By HackerNoon

February 2, 202611m 39s

Audio is streamed directly from the publisher (media.transistor.fm) as published in their RSS feed. Play Podcasts does not host this file. Rights-holders can request removal through the copyright & takedown page.

Show Notes

This story was originally published on HackerNoon at: https://hackernoon.com/generic-interfaces-when-to-use-them.
In this post, we’ll discuss the use of interfaces with type parameters in a couple of common scenarios.
Check more stories related to programming at: https://hackernoon.com/c/programming. You can also check exclusive content about #go, #golang, #generic-interfaces, #go-interfaces, #go-tutorial, #go-guide, #go-type-sets, #hackernoon-top-story, and more.

This story was written by: @Go. Learn more about this writer by checking @Go's about page, and for more stories, please visit hackernoon.com.

As interfaces are types themselves, they too can have type parameters. This idea proves to be surprisingly powerful when it comes to expressing constraints on generic functions and types. In this post, we’ll demonstrate the use of interfaces with type parameters in a couple of common scenarios.

Topics

gogolanggeneric-interfacesgo-interfacesgo-tutorialgo-guidego-type-setshackernoon-top-story