Reflection vs. Generics
Let’s compare reflection and generics in Go.
We'll cover the following...
In this lesson, we’ll develop a utility that prints the elements of a slice in two ways: first, using reflection, and second, using generics.
Coding example
The code of reflection.go
is as follows:
Access this course and 1400+ top-rated courses and projects.