## Datatype-generic programming

### Cached

### Download Links

Venue: | Spring School on Datatype-Generic Programming, volume 4719 of Lecture Notes in Computer Science |

Citations: | 49 - 13 self |

### BibTeX

@INPROCEEDINGS{Gibbons_datatype-genericprogramming,

author = {Jeremy Gibbons},

title = {Datatype-generic programming},

booktitle = {Spring School on Datatype-Generic Programming, volume 4719 of Lecture Notes in Computer Science},

year = {},

publisher = {Springer-Verlag}

}

### Years of Citing Articles

### OpenURL

### Abstract

Abstract. Generic programming aims to increase the flexibility of programming languages, by expanding the possibilities for parametrization — ideally, without also expanding the possibilities for uncaught errors. The term means different things to different people: parametric polymorphism, data abstraction, meta-programming, and so on. We use it to mean polytypism, that is, parametrization by the shape of data structures rather than their contents. To avoid confusion with other uses, we have coined the qualified term datatype-generic programming for this purpose. In these lecture notes, we expand on the definition of datatype-generic programming, and present some examples of datatypegeneric programs. We also explore the connection with design patterns in object-oriented programming; in particular, we argue that certain design patterns are just higher-order datatype-generic programs. 1

### Citations

5859 | Design Patterns: Elements of reusable objected oriented software - Gamma, Helm, et al. - 1995 |

773 | A Pattern Language - Alexander, Ishikawa, et al. - 1977 |

297 | Why Functional Programming Matters - Hughes - 1989 |

221 | Cayenne — a language with dependent types - Augustsson - 1998 |

189 | Template metaprogramming for Haskell - Sheard, Jones - 2002 |

188 | The Java Language Specification, Second Edition - Joy - 2000 |

133 | Qualified Types: Theory and Practice - Jones - 1994 |

106 | Polytypic values possess polykinded types - Hinze |

99 | de Moor O., Algebra of Programming - Bird - 1997 |

97 | The Zipper - Huet - 1997 |

91 |
Generic Programming and the STL: Using and Extending the C++ Standard Template Library
- Austern
- 1998
(Show Context)
Citation Context ...nterpretation of the term ‘generic programming’ is as embodied in the C++ Standard Template Library, an object-oriented class library providing containers, iterators and algorithms for many datatypes =-=[4]-=-. Indeed, some writers have taken the STL style as the definition of generic programming; for example, Siek et al. [120] define generic programming as ‘a methodology for program design and implementat... |

70 | Generic Programming and the STL - AUSTERN - 1999 |

62 |
Modern C++ Design
- Alexandrescu
- 2001
(Show Context)
Citation Context ...ers as error messages, Czarnecki and Eisenecker [22] show the Turing-completeness of the template mechanism by implementing a rudimentary Lisp interpreter as a template meta-program, and Alexandrescu =-=[3]-=- presents a tour de force of unexpected applications of templates. 2.7 Genericity by shape Recall the polymorphic datatype List introduced in Section 2.2, and the corresponding polymorphic higher-orde... |

61 | Proofs from The Book
- Aigner, Ziegler
- 2004
(Show Context)
Citation Context ... of the Calkin–Wilf tree Here, const a is the function that always returns a, and the operator % constructs a rational from its numerator and denominator. For a full derivation of this algorithm, see =-=[2, 49]-=-; briefly, the paths in the tree correspond to traces of Euclid’s algorithm computing the greatest common divisor of the numerator and denominator. Another example of an unfold is given by the functio... |

37 | Patterns of Software: Tales from the Software Community - Gabriel - 1996 |

37 | Elements of a relational theory of datatypes
- Backhouse, Hoogendijk
(Show Context)
Citation Context ...essions. 3 Origami programming There is a branch of the mathematics of program construction devoted to the relationship between the structure of programs and the structure of the data they manipulate =-=[92,101,6, 9,37]-=-. We saw a glimpse of this field in Sections 2.3, 2.5 and 2.7, with the definitions of foldL, foldM and foldB respectively: the structure of each program reflects that of the datatype it traverses, fo... |

36 | Concept checking: Binding parametric polymorphism in C - Siek, Lumsdaine - 2000 |

32 | The Generic Haskell User’s Guide - Clarke, Hinze, et al. - 2001 |

30 | der Woude. Relational catamorphisms - Backhouse, Bruin, et al. - 1991 |

30 | Faking it – simulating dependent types in haskell - McBride |

29 | Regular algebra applied to path finding problems
- Backhouse, Carré
- 1975
(Show Context)
Citation Context ...operty arise from more sophisticated mathematical structures. For example, Horner’s rule for polynomial evaluation [21] can be parametrized by a semiring, an extremal path finder by a regular algebra =-=[5,7]-=-, and a greedy algorithm by a matroid or greedoid structure [27,85]. Mathematical structures are fertile grounds for finding more such examples; the Axiom programming language for computer algebra [73... |

28 | der Woude. Polynomial relators - Backhouse, Bruin, et al. - 1992 |

25 | Polytypic data conversion programs - Jansson, Jeuring - 2002 |

18 | The BOOST graph library - Siek, Lee, et al. - 2001 |

15 | Functional logic overloading - Gasbichler, Neubauer, et al. - 2002 |

14 | Prime number computation - Unruh |

11 | The nature of order - Alexander - 2002 |

11 | Yannis Smaragdakis: Static interfaces in C - McNamara - 2000 |

10 | and Oege de Moor. Container types categorically - Hoogendijk |

9 | Five compilation models for C++ templates - Veldhuizen - 2000 |

7 | Conor McBride. Derivatives of Containers - Abbott, Altenkirch, et al. - 2003 |

6 | Making the usage of STL safe - Gregor, Schupp - 2003 |

6 | Weaving a web - Hinze, Jeuring - 2001 |

5 |
Meertens. Generic programming: An introduction
- Backhouse, Jansson, et al.
- 1998
(Show Context)
Citation Context ...operty arise from more sophisticated mathematical structures. For example, Horner’s rule for polynomial evaluation [21] can be parametrized by a semiring, an extremal path finder by a regular algebra =-=[5,7]-=-, and a greedy algorithm by a matroid or greedoid structure [27,85]. Mathematical structures are fertile grounds for finding more such examples; the Axiom programming language for computer algebra [73... |

3 | Programming with type classes. Presentation at WG2.1#55 - Backhouse, Gibbons - 2001 |

3 | An overview of Edison. Haskell Workshop - Okasaki - 2000 |

2 | Foundation Library. www.sourceforge.net/projects/ hfl - Haskell - 2002 |

2 | Monadic maps and folds for arbitrary datatypes. Dept INF, Univ Twente - Fokkinga - 1994 |