Languages
Generics explained: one idea, three implementations
Generics let you write code once for many types without giving up type safety. TypeScript, Go and Rust each approach them differently.
Tag
Every story tagged #go.
Generics let you write code once for many types without giving up type safety. TypeScript, Go and Rust each approach them differently.
Some languages throw errors up the stack; others return them as values. Each approach makes different mistakes easy or hard.
Languages offer very different tools for doing many things at once. Each model makes certain bugs impossible and others easy.