Computing Atlas

How Computing Was Built
Sign In
Text size
100%
Theme
Concept

Generic Programming

Paradigm

A programming paradigm in which algorithms and data structures are written in terms of types to be specified later, letting the same code work correctly and efficiently across many concrete types without being rewritten for each one.

Facts
Origin Year
1973 1
Core Principle
Algorithms are written in terms of data types to be specified later, then instantiated when needed for specific types provided as parameters. 1
Connections

In Field

Invented

Alexander Stepanov developed generic programming as a paradigm and created the Standard Template Library that brought it into C++.

Sources
1. Generic programming - Wikipedia
  • Lead section, definition sentence
    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.
  • Lead section, sentence on origins in ML
    This approach, pioneered in the programming language ML in 1973, 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.
View the Source
Comments (0)
No comments yet. Be the first to share a thought.
Reader Challenges (0)
No disputes yet. Spotted an error or a better source? Open the first one.