Difference between revisions of "Generic Programming"
GerdIsenberg (talk | contribs) (Created page with "'''Home * Programming * Generic Programming''' '''Generic Programming''' is a [https://en.wikipedia.org/wiki/Programming_paradigm programming paradigm] to w...") |
GerdIsenberg (talk | contribs) |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
'''[[Main Page|Home]] * [[Programming]] * Generic Programming''' | '''[[Main Page|Home]] * [[Programming]] * Generic Programming''' | ||
− | '''Generic Programming''' | + | '''Generic Programming''',<br/> |
− | Generic programming, first implemented in the [[Ada]] programming language, was pioneered by [https://en.wikipedia.org/wiki/Alexander_Stepanov Alexander Stepanov] <ref>[http://www.stlport.org/resources/StepanovUSA.html STLport: An Interview with A. Stepanov] by [http://www.informatik.uni-trier.de/~ley/db/indices/a-tree/r/Russo:Graziano_Lo.html Graziano Lo Russo]</ref>, [[Mathematician#DMusser|David Musser]] and [[Mathematician#DKapur|Deepak Kapur]], and obtained success in C++ when the [https://en.wikipedia.org/wiki/Standard_Template_Library Standard Template Library] became ANSI/ISO C++ standard <ref>[http://www.open-std.org/jtc1/sc22/wg21/ SO/IEC JTC1/SC22/WG21 - The C++ Standards Committee]</ref>. | + | a [https://en.wikipedia.org/wiki/Programming_paradigm programming paradigm] to write efficient, [https://en.wikipedia.org/wiki/Code_reuse reusable] code and [https://en.wikipedia.org/wiki/Library_%28computing%29 software libraries], to operate on any [[Data|data type]], required being passed as a parameter, in [[Cpp|C++]] a [https://en.wikipedia.org/wiki/Compile_time compile time] [https://en.wikipedia.org/wiki/TypeParameter type parameter]. |
+ | Generic programming, first implemented in the [[Ada]] programming language, was pioneered by [https://en.wikipedia.org/wiki/Alexander_Stepanov Alexander Stepanov] <ref>[http://www.stlport.org/resources/StepanovUSA.html STLport: An Interview with A. Stepanov] by [http://www.informatik.uni-trier.de/~ley/db/indices/a-tree/r/Russo:Graziano_Lo.html Graziano Lo Russo]</ref>, [[Mathematician#DMusser|David Musser]] and [[Mathematician#DKapur|Deepak Kapur]], and obtained success in C++ when the [https://en.wikipedia.org/wiki/Standard_Template_Library Standard Template Library] became [https://en.wikipedia.org/wiki/American_National_Standards_Institute ANSI]/[https://en.wikipedia.org/wiki/International_Organization_for_Standardization ISO] C++ standard <ref>[http://www.open-std.org/jtc1/sc22/wg21/ SO/IEC JTC1/SC22/WG21 - The C++ Standards Committee]</ref>. | ||
Generic programming invokes a [https://en.wikipedia.org/wiki/Metaprogramming metaprogramming] facility within a language, in those languages supporting it. | Generic programming invokes a [https://en.wikipedia.org/wiki/Metaprogramming metaprogramming] facility within a language, in those languages supporting it. | ||
In C++, template paramater are either types or integer constants for the wider range of [https://en.wikipedia.org/wiki/Template_%28programming%29 Template-] or metaprogramming. For instance in computer chess programming, it allows to write [[Color|color]] dependent routines once, and disband otherwise conditional code at compile-time. | In C++, template paramater are either types or integer constants for the wider range of [https://en.wikipedia.org/wiki/Template_%28programming%29 Template-] or metaprogramming. For instance in computer chess programming, it allows to write [[Color|color]] dependent routines once, and disband otherwise conditional code at compile-time. | ||
Line 10: | Line 11: | ||
==1980== | ==1980== | ||
* [[Mathematician#DKapur|Deepak Kapur]], [[Mathematician#DMusser|David Musser]], [https://en.wikipedia.org/wiki/Alexander_Stepanov Alexander Stepanov] ('''1981'''). ''[http://portal.acm.org/citation.cfm?doid=942572.806763 Operators and Algebraic Structures]''. [http://www.stepanovpapers.com/p59-kapur.pdf pdf] | * [[Mathematician#DKapur|Deepak Kapur]], [[Mathematician#DMusser|David Musser]], [https://en.wikipedia.org/wiki/Alexander_Stepanov Alexander Stepanov] ('''1981'''). ''[http://portal.acm.org/citation.cfm?doid=942572.806763 Operators and Algebraic Structures]''. [http://www.stepanovpapers.com/p59-kapur.pdf pdf] | ||
− | * [[Mathematician#DKapur|Deepak Kapur]], [[Mathematician#DMusser|David Musser]], [https://en.wikipedia.org/wiki/Alexander_Stepanov Alexander Stepanov] ('''1981'''). ''TECTON: A Language for Manipulating Generic Objects''. in [ | + | * [[Mathematician#DKapur|Deepak Kapur]], [[Mathematician#DMusser|David Musser]], [https://en.wikipedia.org/wiki/Alexander_Stepanov Alexander Stepanov] ('''1981'''). ''TECTON: A Language for Manipulating Generic Objects''. in [https://en.wikipedia.org/wiki/Lecture_Notes_in_Computer_Science LNCS] 134, [https://en.wikipedia.org/wiki/Springer_Science%2BBusiness_Media Springer], [http://www.stepanovpapers.com/Tecton.pdf pdf] |
* [[Mathematician#DMusser|David Musser]], [https://en.wikipedia.org/wiki/Alexander_Stepanov Alexander Stepanov] ('''1988'''). ''Generic Programming''. ISSAC 1988, [http://www.stepanovpapers.com/genprog.pdf pdf] | * [[Mathematician#DMusser|David Musser]], [https://en.wikipedia.org/wiki/Alexander_Stepanov Alexander Stepanov] ('''1988'''). ''Generic Programming''. ISSAC 1988, [http://www.stepanovpapers.com/genprog.pdf pdf] | ||
==1990 ...== | ==1990 ...== | ||
Line 17: | Line 18: | ||
* [[Andrew Koenig]] ('''1994'''). ''Generic Iterators''. [http://dblp.dagstuhl.de/db/journals/joop/joop7.html#Koenig94d JOOP 7, No. 5] | * [[Andrew Koenig]] ('''1994'''). ''Generic Iterators''. [http://dblp.dagstuhl.de/db/journals/joop/joop7.html#Koenig94d JOOP 7, No. 5] | ||
* [https://en.wikipedia.org/wiki/Alexander_Stepanov Alexander Stepanov], [https://en.wikipedia.org/wiki/Meng_Lee Meng Lee] ('''1995'''). ''[http://www.hpl.hp.com/techreports/95/HPL-95-11.html The Standard Template Library]''. HP Laboratories Technical Report 95-11, [http://www.stepanovpapers.com/STL/DOC.PDF pdf] | * [https://en.wikipedia.org/wiki/Alexander_Stepanov Alexander Stepanov], [https://en.wikipedia.org/wiki/Meng_Lee Meng Lee] ('''1995'''). ''[http://www.hpl.hp.com/techreports/95/HPL-95-11.html The Standard Template Library]''. HP Laboratories Technical Report 95-11, [http://www.stepanovpapers.com/STL/DOC.PDF pdf] | ||
− | * [[Mathematician#JCDehnert|James C. Dehnert]], [https://en.wikipedia.org/wiki/Alexander_Stepanov Alexander Stepanov] ('''1998'''). ''[http://portal.acm.org/citation.cfm?id=724183 Fundamentals of Generic Programming]''. [ | + | * [[Mathematician#JCDehnert|James C. Dehnert]], [https://en.wikipedia.org/wiki/Alexander_Stepanov Alexander Stepanov] ('''1998'''). ''[http://portal.acm.org/citation.cfm?id=724183 Fundamentals of Generic Programming]''. [https://en.wikipedia.org/wiki/Lecture_Notes_in_Computer_Science LNCS] 1766, [https://en.wikipedia.org/wiki/Springer_Science%2BBusiness_Media Springer], [http://www.stepanovpapers.com/DeSt98.pdf pdf] |
− | * [http://lafstern.org/matt/ Matthew H. Austern] ('''1999'''). ''Generic Programming and the STL: Using and Extending the C++ Standard Template Library''. [https://en.wikipedia.org/wiki/Addison-Wesley Addison-Wesley | + | * [http://lafstern.org/matt/ Matthew H. Austern] ('''1999'''). ''Generic Programming and the STL: Using and Extending the C++ Standard Template Library''. [https://en.wikipedia.org/wiki/Addison-Wesley Addison-Wesley] |
==2000 ...== | ==2000 ...== | ||
* [https://en.wikipedia.org/wiki/P._J._Plauger P.J. Plauger], [https://en.wikipedia.org/wiki/Meng_Lee Meng Lee], [[Mathematician#DMusser|David Musser]], [https://en.wikipedia.org/wiki/Alexander_Stepanov Alexander Stepanov] ('''2000'''). ''C++ Standard Template Library''. [https://en.wikipedia.org/wiki/Prentice_Hall Prentice Hall] | * [https://en.wikipedia.org/wiki/P._J._Plauger P.J. Plauger], [https://en.wikipedia.org/wiki/Meng_Lee Meng Lee], [[Mathematician#DMusser|David Musser]], [https://en.wikipedia.org/wiki/Alexander_Stepanov Alexander Stepanov] ('''2000'''). ''C++ Standard Template Library''. [https://en.wikipedia.org/wiki/Prentice_Hall Prentice Hall] | ||
Line 33: | Line 34: | ||
* [https://en.wikipedia.org/wiki/Generic_programming Generic programming from Wikipedia] | * [https://en.wikipedia.org/wiki/Generic_programming Generic programming from Wikipedia] | ||
* [https://en.wikipedia.org/wiki/Generic Generic from Wikipedia] | * [https://en.wikipedia.org/wiki/Generic Generic from Wikipedia] | ||
− | * [http://www.cs.rpi.edu/%7Emusser/gp/ Generic Programming] by [ | + | * [http://www.cs.rpi.edu/%7Emusser/gp/ Generic Programming] by [[Mathematician#DMusser|David Musser]] |
− | |||
− | |||
* [https://en.wikipedia.org/wiki/Generic_function Generic function from Wikipedia] | * [https://en.wikipedia.org/wiki/Generic_function Generic function from Wikipedia] | ||
* [https://en.wikipedia.org/wiki/Metaprogramming Metaprogramming from Wikipedia] | * [https://en.wikipedia.org/wiki/Metaprogramming Metaprogramming from Wikipedia] | ||
Line 45: | Line 44: | ||
{{Cpp Templates}} | {{Cpp Templates}} | ||
==[[C sharp|C#]]== | ==[[C sharp|C#]]== | ||
− | * [ | + | * [https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/generics/index Generics (C# Programming Guide)], [https://en.wikipedia.org/wiki/Microsoft_Developer_Network MSDN] |
− | |||
==[[Java]]== | ==[[Java]]== | ||
* [https://en.wikipedia.org/wiki/Generics_in_Java Generics in Java from Wikipedia] | * [https://en.wikipedia.org/wiki/Generics_in_Java Generics in Java from Wikipedia] | ||
− | |||
==[[Delphi]]== | ==[[Delphi]]== |
Latest revision as of 18:38, 23 January 2019
Home * Programming * Generic Programming
Generic Programming,
a programming paradigm to write efficient, reusable code and software libraries, to operate on any data type, required being passed as a parameter, in C++ a compile time type parameter.
Generic programming, first implemented in the Ada programming language, was pioneered by Alexander Stepanov [1], David Musser and Deepak Kapur, and obtained success in C++ when the Standard Template Library became ANSI/ISO C++ standard [2].
Generic programming invokes a metaprogramming facility within a language, in those languages supporting it.
In C++, template paramater are either types or integer constants for the wider range of Template- or metaprogramming. For instance in computer chess programming, it allows to write color dependent routines once, and disband otherwise conditional code at compile-time.
Contents
Selected Publications
1980
- Deepak Kapur, David Musser, Alexander Stepanov (1981). Operators and Algebraic Structures. pdf
- Deepak Kapur, David Musser, Alexander Stepanov (1981). TECTON: A Language for Manipulating Generic Objects. in LNCS 134, Springer, pdf
- David Musser, Alexander Stepanov (1988). Generic Programming. ISSAC 1988, pdf
1990 ...
- Alexander Stepanov (1991). Design of Generic Libraries. Lecture given at SRI, pdf
- Andrew Koenig (1994). Templates and Generic Algorithms. JOOP 7 No. 3
- Andrew Koenig (1994). Generic Iterators. JOOP 7, No. 5
- Alexander Stepanov, Meng Lee (1995). The Standard Template Library. HP Laboratories Technical Report 95-11, pdf
- James C. Dehnert, Alexander Stepanov (1998). Fundamentals of Generic Programming. LNCS 1766, Springer, pdf
- Matthew H. Austern (1999). Generic Programming and the STL: Using and Extending the C++ Standard Template Library. Addison-Wesley
2000 ...
- P.J. Plauger, Meng Lee, David Musser, Alexander Stepanov (2000). C++ Standard Template Library. Prentice Hall
- Andrei Alexandrescu (2001). Modern C++ Design: Generic Programming and Design Patterns Applied.
2010 ...
- Stephanie Weirich (2010). Generic Programming With Dependent Types. Spring School on Generic and Indexed Programming, Wadham College, Oxford
- Alexander Stepanov, Daniel E. Rose (2015). From Mathematics to Generic Programming. Addison-Wesley
Forum Posts
- C++ templates question by José C. Martínez Galán, CCC, January 18, 2012
- C++ auto-expanding vector class template by Steven Edwards, CCC, August 15, 2015
External Links
- Generic programming from Wikipedia
- Generic from Wikipedia
- Generic Programming by David Musser
- Generic function from Wikipedia
- Metaprogramming from Wikipedia
- Multiple inheritance from Wikipedia
- Operator overloading from Wikipedia
- Polymorphism from Wikipedia
C++
- Template (programming) from Wikipedia
- List of C++ template libraries from Wikipeadia
- Standard Template Library from Wikipedia
- Loki (C++) from Wikipedia by Andrei Alexandrescu as part of his book Modern C++ Design.
- Boost (C++ libraries) from Wikipedia
- Templates - C++ Documentation
- Metaprogramming in C++
- C++ Programming/Templates from Wikibooks
- Template Meta-Programming from Wikibooks
- Barton–Nackman trick from Wikipedia
- Curiously recurring template pattern from Wikipedia
- Variadic template from Wikipedia