Generic programming: Difference between revisions

Content deleted Content added
Restructure and Clarify the introductory section on Generics and Templates.
Line 78:
[[Array data type|Arrays]] and [[struct (C programming language)|structs]] can be viewed as predefined generic types. Every usage of an array or struct type instantiates a new concrete type, or reuses a previous instantiated type. Array element types and struct element types are parameterized types, which are used to instantiate the corresponding generic type. All this is usually built-in in the [[compiler]] and the syntax differs from other generic constructs. Some [[extensible programming|extensible programming languages]] try to unify built-in and user defined generic types.
 
A broad survey of genericity mechanisms in programming languages follows. For a specific survey comparing suitability of mechanisms for generic programming, see.<ref>{{cite documentciteseerx | title=An extended comparative study of language support for generic programming (preprint)| author1=R. Garcia |author2 =J. Ja ̈rvi |author3 =A. Lumsdaine |author4 =J. Siek |author5 =J. Willcock |year=2005|citeseerx = 10.1.1.110.122}}</ref>
 
===In object-oriented languages===