Generic programming

Generic programming is a style of computer programming in which algorithms are written in terms of types to-be-specified-later that are then instantiated when needed for specific types provided as parameters. This approach, pioneered by the ML programming language in 1973, permits writing common functions or types that differ only in the set of types on which they operate when used, thus reducing duplication. Such software entities are known as generics in Ada, C#, Delphi, Eiffel, F#, Java, Nim, Python, Go, Rust, Swift, TypeScript and Visual Basic .NET. They are known as parametric polymorphism in ML, Scala, Julia, and Haskell (the Haskell community also uses the term "generic" for a related but somewhat different concept); templates in C++ and D; and parameterized types in the influential

Author
enAlexander Stepanov
enBjarne Stroustrup
enMusser, David R.; Stepanov, Alexander A.
Comment
enGeneric programming is a style of computer programming in which algorithms are written in terms of types to-be-specified-later that are then instantiated when needed for specific types provided as parameters. This approach, pioneered by the ML programming language in 1973, permits writing common functions or types that differ only in the set of types on which they operate when used, thus reducing duplication. Such software entities are known as generics in Ada, C#, Delphi, Eiffel, F#, Java, Nim, Python, Go, Rust, Swift, TypeScript and Visual Basic .NET. They are known as parametric polymorphism in ML, Scala, Julia, and Haskell (the Haskell community also uses the term "generic" for a related but somewhat different concept); templates in C++ and D; and parameterized types in the influential
Date
28 August 2019
DifferentFrom
Genetic programming
Has abstract
enGeneric programming is a style of computer programming in which algorithms are written in terms of types to-be-specified-later that are then instantiated when needed for specific types provided as parameters. This approach, pioneered by the ML programming language in 1973, permits writing common functions or types that differ only in the set of types on which they operate when used, thus reducing duplication. Such software entities are known as generics in Ada, C#, Delphi, Eiffel, F#, Java, Nim, Python, Go, Rust, Swift, TypeScript and Visual Basic .NET. They are known as parametric polymorphism in ML, Scala, Julia, and Haskell (the Haskell community also uses the term "generic" for a related but somewhat different concept); templates in C++ and D; and parameterized types in the influential 1994 book Design Patterns. 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 whereby fundamental requirements on 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.
Hypernym
Style
Is primary topic of
Generic programming
Label
enGeneric programming
Link from a Wikipage to an external page
edn.embarcadero.com/article/38757
www.cs.uu.nl/wiki/pub/GP/CourseLiterature/afp08.pdf
www.felix-colibri.com/papers/oop_components/delphi_generics_tutorial/delphi_generics_tutorial.html
archive.org/details/designpatternsel00gamm
www.ecma-international.org/publications/standards/Ecma-367.htm
www.drbob42.com/examines/examinA4.htm
web.archive.org/web/20050404015900/https:/www.cs.uu.nl/~andres/ExploringGH.pdf
www.oracle.com/technetwork/java/javase/generics-tutorial-159168.pdf
www.cs.uu.nl/research/projects/generic-haskell/compiler/diamond/GHUsersGuide.pdf
www.research.att.com/~bs/hopl-almost-final.pdf
msdn.microsoft.com/msdnmag/issues/03/09/NET/
msdn.microsoft.com/msdnmag/issues/03/10/NET/
sjrd.developpez.com/delphi/tutoriel/generics/
web.archive.org/web/20041207211740/https:/www.cs.vu.nl/boilerplate/
web.archive.org/web/20090131211440/https:/blogs.teamb.com/craigstuntz/2008/08/29/37832/
web.archive.org/web/20190828045251/https:/lcsd05.cs.tamu.edu/
www.generic-haskell.org/
www.stepanovpapers.com/
haskell.org/onlinereport/index.html
www.angelikalanger.com/GenericsFAQ/JavaGenericsFAQ.html
lcsd05.cs.tamu.edu
www.cs.ox.ac.uk/ralf.hinze/publications/Masses.pdf
www.freepascal.org/docs-html/ref/refch8.html
www.digitalmars.com/d/templates-revisited.html
codeplex.com/Wiki/View.aspx%3FProjectName=genericsnet
www.elegantcoding.com/2012/04/what-is-generic-programming.html
www.generic-programming.org
Link from a Wikipage to another Wikipage
.NET Framework
Abstract algebra
Ada (programming language)
Ada programming language
Alexander Stepanov
Algorithm
Analysis of algorithms
Array data type
Association for Computing Machinery
Associative array
Attribute (computing)
Banach space
BETA programming language
Binary tree
Bjarne Stroustrup
Boilerplate code
Boxing (computer science)
C (programming language)
C++
Category:Articles with example C Sharp code
Category:Generic programming
Chrome programming language
Clean (programming language)
CLU programming language
Code bloat
Collection class
Compiler
Compile time
Compile-time
Compile-time function execution
Compile-time polymorphism
Complex number
Computer programming
Concept (generic programming)
Concepts (C++)
Covariance and contravariance (computer science)
C Sharp (programming language)
D (programming language)
Data type
David Musser
Delphi (programming language)
Design Patterns (book)
Digital Equipment Corporation
Domain-specific language
D programming language
Duck typing
Duplicate code
Eiffel (programming language)
Extensible programming
Forth (programming language)
Free Pascal
F Sharp (programming language)
Function (computer science)
Functional programming
Generic function
Generics
Go (programming language)
Hardware register
Haskell (programming language)
Heap (programming)
Inline function
International Conference on Functional Programming
Iterator
Java (programming language)
Java Platform, Standard Edition
Julia (programming language)
Kind (type theory)
Library (computer science)
Linked list
Linker (computing)
Macro (computer science)
ML (programming language)
Modular programming
Netherlands
Nim (programming language)
Object-based programming
Object-oriented programming
OCaml
Operator overloading
Parameter (computer programming)
Parametric polymorphism
Partial evaluation
Partial template specialization
Permutation
Polymorphism (computer science)
Preprocessor
Programming paradigm
Protocol (computer science)
Python (programming language)
Ralf Lämmel
Range (computer programming)
Reflection (computer science)
Reification (computer science)
Ring (mathematics)
Run time (program lifecycle phase)
Rust (programming language)
Scala (programming language)
Scheme (programming language)
Signature (computer science)
SIGPLAN
Simon Peyton Jones
Standard ML
Standard template library
Standard Template Library
Struct (C programming language)
Structural type system
Subtyping
Swift (programming language)
Template (C++)
Template (programming)
Template metaprogramming
Trellis-Owl
Turing complete
Type (computer science)
Type class
Type conversion
Type erasure
Type inference
Type polymorphism
Type safe
Type safety
TypeScript
Utrecht University
Verilog
VHDL
Visual Basic .NET
SameAs
4431718-9
8oDx
Geneerinen ohjelmointi
Généricité
Genericiteit
Generické programování
Generičko programiranje
Generičko programiranje
Generičko programiranje
Generično programiranje
Generic programming
Generische Programmierung
Generisk programmering
Generisk programmering
Lập trình tổng quát
m.0qjrr
Programação genérica
Programació genèrica
Programación genérica
Programowanie uogólnione
Q1051282
Üldistav programmeerimine
Абагульненае праграмаванне
Обобщённое программирование
Узагальнене програмування
Шаблонни типове
תכנות גנרי
برنامه‌نویسی همگانی
ジェネリックプログラミング
泛型编程
제네릭 프로그래밍
Source
enAn Interview with A. Stepanov
enEvolving a language in and for the real world: C++ 1991-2006
enGeneric Programming
enShort History of STL
Subject
Category:Articles with example C Sharp code
Category:Generic programming
Text
enFollowing Stepanov, we can define generic programming without mentioning language features: Lift algorithms and data structures from concrete examples to their most general and abstract form.
enGeneric programming centers around the idea of abstracting from concrete, efficient algorithms to obtain generic algorithms that can be combined with different data representations to produce a wide variety of useful software.
enGeneric programming is about abstracting and classifying algorithms and data structures. It gets its inspiration from Knuth and not from type theory. Its goal is the incremental construction of systematic catalogs of useful, efficient and abstract algorithms and data structures. Such an undertaking is still a dream.
enI believe that iterator theories are as central to Computer Science as theories of rings or Banach spaces are central to Mathematics.
Url
https://web.archive.org/web/20190828045251/https:/lcsd05.cs.tamu.edu/
WasDerivedFrom
Generic programming?oldid=1123783081&ns=0
WikiPageLength
62957
Wikipage page ID
105837
Wikipage revision ID
1123783081
WikiPageUsesTemplate
Template:Authority control
Template:Citation needed
Template:Cite book
Template:Cite conference
Template:C-lang
Template:Data types
Template:Distinguish
Template:Em
Template:Harvtxt
Template:ISBN
Template:Main article
Template:Programming paradigms
Template:Quote
Template:Refbegin
Template:Refend
Template:Reflist
Template:Sfn
Template:Short description
Template:Slink
Template:Use dmy dates
Template:Webarchive