Tag

#Generics

Every article tagged Generics, in one place.

  • 3 articles
  • 3 min of reading
  • 18 Sep, 2026 last updated

Showing 3 articles

Rust 1 min read

Traits and Generics in Rust

A trait defines behaviour that types can implement, similar to an interface. Generics let functions work with any type that implements the traits they need. Defining and implementing a trait trait Notifier { fn send(&self, to: &str, message: &str) -> Result<()...

23 Jul, 2026 Author 178 119
Read article
Go 1 min read

Generics in Go: Type Parameters by Example

Generics arrived in Go 1.18. They let you write functions and types that work for many types while staying type-safe, without falling back to interface{} and type assertions. A generic function func Map[T, U any](items []T, fn func(T) U) []U { out := make([]U,...

22 Jul, 2026 Author 364 104
Read article