<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://wiki.karljones.com/index.php?action=history&amp;feed=atom&amp;title=Parametric_polymorphism</id>
		<title>Parametric polymorphism - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.karljones.com/index.php?action=history&amp;feed=atom&amp;title=Parametric_polymorphism"/>
		<link rel="alternate" type="text/html" href="http://wiki.karljones.com/index.php?title=Parametric_polymorphism&amp;action=history"/>
		<updated>2026-10-23T21:13:08Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.24.2</generator>

	<entry>
		<id>http://wiki.karljones.com/index.php?title=Parametric_polymorphism&amp;diff=18560&amp;oldid=prev</id>
		<title>Karl Jones: Created page with &quot;In programming languages and type theory, '''parametric polymorphism''' is a way to make a language more expressive, while still maintaining full...&quot;</title>
		<link rel="alternate" type="text/html" href="http://wiki.karljones.com/index.php?title=Parametric_polymorphism&amp;diff=18560&amp;oldid=prev"/>
				<updated>2016-09-20T18:03:43Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;In &lt;a href=&quot;/index.php/Programming_language&quot; title=&quot;Programming language&quot;&gt;programming languages&lt;/a&gt; and &lt;a href=&quot;/index.php/Type_theory&quot; title=&quot;Type theory&quot;&gt;type theory&lt;/a&gt;, &amp;#039;&amp;#039;&amp;#039;parametric polymorphism&amp;#039;&amp;#039;&amp;#039; is a way to make a language more expressive, while still maintaining full...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;In [[Programming language|programming languages]] and [[type theory]], '''parametric polymorphism''' is a way to make a language more expressive, while still maintaining full static [[type safety]].&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
Using parametric polymorphism, a function or a data type can be written generically so that it can handle values identically without depending on their type.&lt;br /&gt;
&lt;br /&gt;
Such functions and data types are called generic functions and generic datatypes respectively and form the basis of [[generic programming]].&lt;br /&gt;
&lt;br /&gt;
For example, a function append that joins two lists can be constructed so that it does not care about the type of elements: it can append lists of integers, lists of real numbers, lists of strings, and so on. Let the type variable a denote the type of elements in the lists. Then append can be typed forall a. [a] × [a] -&amp;gt; [a], where [a] denotes the type of lists with elements of type a. We say that the type of append is parameterized by a for all values of a. (Note that since there is only one type variable, the function cannot be applied to just any pair of lists: the pair, as well as the result list, must consist of the same type of elements.) For each place where append is applied, a value is decided for a.&lt;br /&gt;
&lt;br /&gt;
Following [[Christopher Strachey]], parametric polymorphism may be contrasted with ad hoc polymorphism, in which a single polymorphic function can have a number of distinct and potentially heterogeneous implementations depending on the type of argument(s) to which it is applied. Thus, ad hoc polymorphism can generally only support a limited number of such distinct types, since a separate implementation has to be provided for each type.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Polymorphic recursion]]&lt;br /&gt;
* [[Type class # Higher-kinded polymorphism]]&lt;br /&gt;
* [[Type safety]]&lt;br /&gt;
* [[Type theory]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Parametric_polymorphism Parametric polymorphism] @ Wikipedia&lt;br /&gt;
&lt;br /&gt;
[[Category:Computer programming]]&lt;/div&gt;</summary>
		<author><name>Karl Jones</name></author>	</entry>

	</feed>