Jan. 11, 2026
Go Generics: What Are Those Squiggly Lines?
The Generic Problem Before Go 1.18 (2022), if you wanted to write a function that worked with different types, you had two choices:
Write duplicate code for each type Use interface{} and lose type safety Generics solve this by letting you write one function that works with many types while keeping …