Generic programming: Difference between revisions

Content deleted Content added
m In Delphi: WP:LINK fix-standardize; my error.
added to distinguish hatnote
Line 1:
{{Short description|Style of computer programming}}
{{Distinguish|Genetic programming}}
{{Use dmy dates|date=November 2020}}
{{Distinguish|Genetic programming|Pseudocode}}
 
'''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 [[Parameter (computer programming)|parameters]]. This approach, pioneered in the [[programming language]] [[ML (programming language)|ML]] in 1973,<ref name="Lee2008">
{{cite book
Line 199 ⟶ 200:
====Templates in C++====
{{Main|Template (C++)}}
 
C++ uses templates to enable generic programming techniques. The C++ Standard Library includes the [[Standard Template Library]] or STL that provides a framework of templates for common data structures and algorithms. Templates in C++ may also be used for [[template metaprogramming]], which is a way of pre-evaluating some of the code at compile-time rather than [[Run time (program lifecycle phase)|run-time]]. Using template specialization, C++ Templates are [[Turing complete]].