Generic programming
Way of designing and writing programs where algorithms are written in terms of parametric types enabling easy reuse
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, 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.
Nº Q1051282 ★★
Uncommon · Knowledge
Generic programming
Way of designing and writing programs where algorithms are written in terms of parametric types enabling easy reuse
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, 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.
From Wikipedia
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, 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. 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 parameterized types were introduced in the influential 1994 book Design Patterns. 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 Stepanov 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.
Text: Wikipédia, CC BY-SA 4.0. ·
Related cards
-
I
Introduction to Algorithms
Book on computer programming
Nº Q1141518 ★★
Not listed
-
Data type
Classification of data in computer science
Nº Q190087 ★★
Not listed
-
Scripting language
Programming language for run-time events
Nº Q187432 ★★★★
Not listed
-
Programming language
Language for communicating instructions to a machine
Nº Q9143 ★★★★★
Not listed
-
SPARK (programming language)
Programming language
Nº Q3493345 ★
Not listed
-
Pair programming
Collaborative technique for software development
Nº Q607013 ★★
Not listed
-
Computer programming
The process of designing and building an executable computer program to accomplish a specific computing result or to perform a specific task
Nº Q80006 ★★★★
Not listed
-
G
General Problem Solver
Computer program created in 1959
Nº Q1387212 ★
Not listed
-
Lex (software)
Standard UNIX utility
Nº Q306650 ★
Not listed
-
Imperative programming
Programming paradigm of directly specifying commands that affect program state
Nº Q275596 ★★★
Not listed
-
D
Data-driven programming
Programming paradigm
Nº Q287472 ★
Not listed
-
Programming language theory
Branch of computer science that deals with the design, implementation, analysis, characterization, and classification of programming languages and their individual features
Nº Q2670534 ★
Not listed
-
A
Abstract data type
Mathematical model for data types
Nº Q827335 ★★
Not listed
-
M
ML (programming language)
Functional programming language
Nº Q860654 ★★
Not listed
-
Evolutionary programming
Evolutionary algorithm paradigm where the structure of the program to be optimized is fixed, while its numerical parameters are allowed to evolve
Nº Q2596288 ★
Not listed
-
Generic term
Term that denotes a more encompassing or ample concept with a generic relation
Nº Q12379553 ★
Not listed
-
M
Multi-paradigm programming language
Programming language type
Nº Q12772052 ★★
Not listed
-
Scheme (programming language)
Dialect of the Lisp programming language
Nº Q187560 ★★
Not listed