🎉 October Learning Month — learn a new software term every day!
An interactive flashcard trainer for software engineering terms.

Generics

In plain terms

Writing code that works across many types using type parameters.

Going deeper

Generics let you define functions and data structures parameterized by type, so one implementation safely handles many types without duplication. They preserve type safety.

Under the hood

Compile-time type checking avoids casts and runtime errors; languages implement them via monomorphization or type erasure.

Examples

List<T>, Java/C# generics, Rust traits, TypeScript generics, C++ templates.

Think of it like...

Like a one-size container with a label slot: same box, works for books, tools, or toys.

Feedback & Bug Report