Content deleted Content added
Jerryobject (talk | contribs) m →Generics in Ada: WP:LINKs: add, update-standardize. Proper noun > MOS:CAPS. |
Jerryobject (talk | contribs) WP:LINKs: adds, update-standardizes, needless WP:PIPEs > WP:NOPIPEs. WP:BADEMPHASIS MOS:QUOTEMARKS > WP:ITALICs. |
||
Line 2:
{{Distinguish|Genetic programming}}
{{Use dmy dates|date=November 2020}}
'''Generic programming''' is a style of [[computer programming]] in which [[algorithm]]s are written in terms of [[data type]]s ''to-be-specified-later'' that are then ''instantiated'' when needed for specific types provided as [[
{{cite book
|
|
| date=15 December 2008▼
| title=Programming Languages: An Active Learning Approach
| url=https://books.google.com/books?id=OuW5dC2O99AC&pg=PA9
▲| date=15 December 2008
| publisher=Springer Science & Business Media
| isbn=978-0-387-79422-8
| pages=9–10}}</ref><ref>{{cite conference |last1=Milner |first1=R. |author1-link=Robin Milner |last2=Morris |first2=L. |last3=Newey |first3=M. |year=1975 |title=A Logic for Computable Functions with Reflexive and Polymorphic Types |book-title=Proceedings of the Conference on Proving and Improving Programs}}</ref> permits writing common [[
Generic programming was introduced to the mainstream with [[Ada (programming language)|Ada]] in 1977. With [[Template (C++)|templates]] in [[C++]], generic programming became part of the repertoire of professional [[Library (computing)|library]] design. The techniques were further improved and ''parameterized types'' were introduced in the influential 1994 book ''[[Design Patterns]]''.<ref name="GoF">
{{cite book |last1=Gamma
|first1=Erich
Line 30:
}}</ref>
New techniques were introduced by [[Andrei Alexandrescu]] in his 2001 book ''[[Modern C++ Design
Such software entities are known as ''generics'' in [[Ada (programming language)|Ada]], [[C Sharp (programming language)|C#]], [[Delphi (software)|Delphi]], [[Eiffel (programming language)|Eiffel]], [[F Sharp (programming language)|F#]], [[Java (programming language)|Java]], [[Nim (programming language)|Nim]], [[Python (programming language)|Python]], [[Go (programming language)|Go]], [[Rust (programming language)|Rust]], [[Swift (programming language)|Swift]], [[TypeScript]], and [[Visual Basic (.NET)]]. They are known as ''[[parametric polymorphism]]'' in [[ML (programming language)|ML]], [[Scala (programming language)|Scala]], [[Julia (programming language)|Julia]], and [[Haskell]]. (Haskell terminology also uses the term
The term ''generic programming'' was originally coined by [[David Musser]] and [[Alexander Stepanov]]{{sfn|Musser|Stepanov|1989}} 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 structure]]s and formalized as [[Concept (generic programming)|concepts]], with [[generic function]]s implemented in terms of these concepts, typically using language genericity mechanisms as described above.
Line 106:
</syntaxhighlight>
The C++ <code>template</code> construct used above is widely cited{{Citation needed|date=May 2010}} as the genericity construct that popularized the notion among programmers and [[List of programming language researchers|language designers]] and supports many generic programming idioms. The D
[[C Sharp (programming language)|C#]] 2.0, [[Oxygene (programming language)|Oxygene]] 1.5
====Generics in Ada====
|