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
-
C
Crystal (programming language)
Programming language
Nº Q21921428 ★
Not listed
-
F
Functional programming
Programming paradigm based on applying and composing functions
Nº Q193076 ★★★
Not listed
-
R (programming language)
Programming language for statistical analysis
Nº Q206904 ★★★★★★
Not listed
-
S
Specification language
Formal language used in computer science
Nº Q1209840 ★
Not listed
-
Computer
General-purpose device for performing arithmetic or logical operations
Nº Q68 ★★★★★
Not listed
-
A
Automata-based programming
Programming paradigm centred around finite state machines
Nº Q4056322 ★
Not listed
-
History of Python
History of the Python programming language
Nº Q4205080 ★★★
Not listed
-
Z notation
Formal specification language used for describing and modelling computing systems, standardized in ISO 13568
Nº Q1430781 ★
Not listed
-
Analytical engine
Proposed mechanical general-purpose computer, designed by Charles Babbage
Nº Q485257 ★★★
Not listed
-
Minimalist program
Linguistic research program proposed by N. Chomsky; radically revises the Government and Binding approach; asserts that Universal Grammar is a “perfect” system, i.e. optimal according to several global metrics; abandons concepts such as government
Nº Q177724 ★
Not listed
-
X86
Type of instruction set architecture
Nº Q182933 ★★★
Not listed
-
G
Generic she
Nº Q100706123 ★★
Not listed
-
T
Timsort
Hybrid sorting algorithm based on insertion sort and merge sort
Nº Q942403 ★★★
Not listed
-
Linear congruential generator
Pseudorandom number generator
Nº Q1190228 ★★
Not listed
-
Reduced instruction set computer
Processor executing one instruction in minimal clock cycles
Nº Q189376 ★★★
Not listed
-
S
SOLID
Acronym for object-oriented design in computer programming
Nº Q2583627 ★★★
Not listed
-
M
Metaprogramming
Programming paradigm
Nº Q661075 ★★
Not listed
-
S
SNOBOL4
Programming language tailored to complex pattern matching and text manipulation
Nº Q121288716 ★
Not listed