March 15, 2022

Go 1.18 added generics

GoA language from Google — simple syntax, fast compilation, and built-in concurrency via goroutines. 1.18 released on March 15, 2022 with type parameters — the language's most requested feature after a decade of interfaces-only abstraction.

What it was for

Go (programming language)genericsType parameters in languages — write one class or function that works with many types safely. let GoA language from Google — simple syntax, fast compilation, and built-in concurrency via goroutines. developers write `func MapT any(s []T, f func(T) T)` without code generation hacks. KubernetesAn orchestration system for containers — schedules, scales, and manages fleets of services in production. controllers, observability tools, and cloud SDKs adopted generic containers and result types while keeping GoA language from Google — simple syntax, fast compilation, and built-in concurrency via goroutines.'s simple syntax.

Companies

  • Google

Why it's here

genericsType parameters in languages — write one class or function that works with many types safely. closed the biggest gap between GoA language from Google — simple syntax, fast compilation, and built-in concurrency via goroutines. and other statically typed languages.

Why it mattered

Libraries could share algorithms without `interface{}` casts or external code generators.

What it solved

TeamsMicrosoft Teams — chat, video calls, and Office integration for workplace collaboration. duplicated slice/map helpers or used unsafe reflection because GoA language from Google — simple syntax, fast compilation, and built-in concurrency via goroutines. lacked parametric polymorphism.

Media

  • Go (programming language)
    ImageGo (programming language)

    The Go Authors, Public domain, via Wikimedia Commons

Related