Patterns in Datatype−Generic Programming

<em>Generic programming</em> consists of increasing the expressiveness of programs by allowing a wider variety of kinds of parameter than is usual. The most popular instance of this scheme is the C++ Standard Template Library. <em>Datatype-generic programming</em> is another...

Descrición completa

Detalles Bibliográficos
Autor Principal: Gibbons, J
Formato: Conference item
Publicado: John von Neumann Institute for Computing (NIC) 2003
Descripción
Summary:<em>Generic programming</em> consists of increasing the expressiveness of programs by allowing a wider variety of kinds of parameter than is usual. The most popular instance of this scheme is the C++ Standard Template Library. <em>Datatype-generic programming</em> is another instance, in which the parameters take the form of datatypes. We argue that datatype-generic programming is sufficient to express essentially all the genericity found in the Standard Template Library. Moreover, datatype-generic programming is a precisely-defined notion with a rigorous mathematical foundation, in contrast to generic programming in general and the C++ template mechanism in particular, and thereby offers the prospect of better static checking and a greater ability to reason about generic programs. This paper describes work in progress.