Patterns in Datatype−Generic Programming

Generic programming 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. Datatype-generic programming 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, and to capture the abstractions motivating many design patterns. 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.

[1]  Sibylle Schupp,et al.  Making the Usage of STL Safe , 2002, Generic Programming.

[2]  Ralf Hinze,et al.  Polytypic values possess polykinded types , 2000, Sci. Comput. Program..

[3]  Chris Okasaki,et al.  An Overview of Edison , 2001, Haskell.

[4]  Simon L. Peyton Jones,et al.  Template meta-programming for Haskell , 2002, Haskell '02.

[5]  Peter Thiemann,et al.  Functional logic overloading , 2002, POPL '02.

[6]  Ralf Hinze,et al.  Weaving a web , 2001, Journal of Functional Programming.

[7]  John Hughes,et al.  Why Functional Programming Matters , 1989, Comput. J..

[8]  Erik Poll,et al.  Algebra of Programming by Richard Bird and Oege de Moor, Prentice Hall, 1996 (dated 1997). , 1999 .

[9]  Maarten M. Fokkinga Monadic Maps and Folds for Arbitrary Datatypes , 1994 .

[10]  Ralph Johnson,et al.  design patterns elements of reusable object oriented software , 2019 .

[11]  Murray Silverstein,et al.  A Pattern Language , 1977 .

[12]  Gérard P. Huet,et al.  The Zipper , 1997, Journal of Functional Programming.

[13]  Richard P. Gabriel,et al.  Patterns of Software: Tales from the Software Community , 1996 .

[14]  Andrei Alexandrescu,et al.  Modern C++ Design , 2001 .

[15]  Peyton Jones,et al.  Haskell 98 language and libraries : the revised report , 2003 .

[16]  Johan Jeuring,et al.  Polytypic data conversion programs , 2002, Sci. Comput. Program..

[17]  Ralf Hinze,et al.  The Generic Haskell user's guide , 2001 .

[18]  Max Jacobson,et al.  A Pattern Language: Towns, Buildings, Construction , 1981 .

[19]  Yannis Smaragdakis,et al.  Static interfaces in C , 2000 .

[20]  Matthew Harold Austern,et al.  Generic programming and the STL , 1998 .

[21]  Richard S. Bird,et al.  Algebra of programming , 1997, Prentice Hall International series in computer science.

[22]  Mark P. Jones Qualified Types: Theory and Practice , 1994 .

[23]  Jeremy G. Siek,et al.  Concept Checking: Binding Parametric Polymorphism in C++ , 2000 .

[24]  Alexander A. Stepanov,et al.  Generic Programming , 1988, ISSAC.

[25]  Ted Neward,et al.  C# in a Nutshell , 2002 .

[26]  Christopher Alexander The Nature of Order , 2005 .

[27]  Conor McBride Faking it: Simulating dependent types in Haskell , 2002, J. Funct. Program..

[28]  Paul F. Hoogendijk,et al.  Container types categorically , 2000, Journal of Functional Programming.

[29]  Lennart Augustsson,et al.  Cayenne—a language with dependent types , 1998, ICFP '98.

[30]  Krzysztof Czarnecki,et al.  Generative programming - methods, tools and applications , 2000 .

[31]  Todd L. Veldhuizen Five compilation models for C++ templates , 2000 .

[32]  Jim Law,et al.  Review of "The boost graph library: user guide and reference manual by Jeremy G. Siek, Lie-Quan Lee, and Andrew Lumsdaine." Addison-Wesley 2002. , 2003, SOEN.

[33]  Thorsten Altenkirch,et al.  Derivatives of Containers , 2003, TLCA.

[34]  James Gosling The Java Language Specification - Second Edition , 2000 .