Skip to content
Main menu
  • Main page
  • Discover
  • Unexpected connections
  • Topics
  • Random article
  • Search
Your library
  • Saved articles
  • Recent discoveries
  • Rabbit-hole trails
Topic areas
  • Computer Science
  • Mathematics
  • Physics
  • Engineering
  • Biology
  • Economics
  • Curiosities
WikiholeDeeper into Wikipedia
EnglishEN
  • Saved
  • History

  • Article text and media come live from Wikipedia via the official MediaWiki API and are available under the Creative Commons Attribution-ShareAlike 4.0 License; additional terms may apply. Each article links to its source and revision.
  • WikiHole is an independent project and is not affiliated with the Wikimedia Foundation.
  • How ranking works
  • All topics
  • Reading history
  • Random article
  • MediaWiki API

Generic programming

  • Article
  • Rabbit hole
  • Read
  • View history
Tools
Actions
  • Read
  • View history
General
  • Recent changes
  • Related articles
  • Random discovery
This article
Reading time
24 min
Topic
Computer Science
Quality
C-class
Views
1k in 14 days
Last edited
20 Sept 2026
Print/export
  • Printable version
In other projects
  • Wikidata item
From Wikipedia, the free encyclopedia
Rabbit hole:
  1. Generic programming

Generic programming is a style of computer programming in which algorithms are written in terms of data types to-be-specified-later that are then instantiated when needed for specific types provided as parameters. This approach, pioneered in the programming language ML in 1973,12 permits writing common functions or data types that differ only in the set of types on which they operate when used, thus reducing duplicate code.

Not to be confused with Genetic programming or Pseudocode.

Generic programming was introduced to the mainstream with Ada in 1977. With templates in C++, generic programming became part of the repertoire of professional library design. The techniques were further improved and were introduced in the influential 1994 book .

parameterized types
Design Patterns
3

New techniques were introduced by Andrei Alexandrescu in his 2001 book Modern C++ Design: Generic Programming and Design Patterns Applied. Subsequently, D implemented the same ideas.

Such software entities are known as generics in Ada, C#, Dart, Delphi, Eiffel, F#, Java, Mojo, Nim, Python, Go, Rust, Swift, TypeScript, and Visual Basic (.NET). They are known as parametric polymorphism in ML, Scala, Julia, and Haskell. (Haskell terminology also uses the term generic for a related but somewhat different concept.)

The term generic programming was originally coined by David Musser and Alexander Stepanov4 in a more specific sense than the above, to describe a programming paradigm in which fundamental requirements on data types are abstracted from across concrete examples of algorithms and data structures and formalized as concepts, with generic functions implemented in terms of these concepts, typically using language genericity mechanisms as described above.

Loading the rest of the article…

Recent changes

Rabbit hole

Where Generic programming leads. Every connection below has a source: a link in this article, a shared Wikipedia category, or CirrusSearch text similarity. Articles already on your trail are left out.

The rest of this article could not be loaded.

Wikipedia is rate limiting us right now. Try again in a minute.
Try again

Related articles are unavailable right now.

Wikipedia is rate limiting us right now. Try again in a minute.
Last edited
20 Sept 2026

Wikipedia did not return the list of recent edits.

View full revision history

General
  • Recent changes
  • Related articles
  • Random discovery
This article
Reading time
24 min
Topic
Computer Science
Quality
C-class
Views
1k in 14 days
Last edited
20 Sept 2026
Print/export
  • Printable version
In other projects
  • Wikidata item
Last edited
20 Sept 2026