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
Core PrincipleAlgorithms 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 SourceReader Challenges (0)
No disputes yet. Spotted an error or a better source? Open the first one.
Sign in to dispute this or suggest a correction.