“Scrap your boilerplate” reloaded

R Hinze, A Löh, BCS Oliveira - … , FLOPS 2006, Fuji-Susono, Japan, April …, 2006 - Springer
Functional and Logic Programming: 8th International Symposium, FLOPS 2006 …, 2006Springer
The paper “Scrap your boilerplate”(SYB) introduces a combinator library for generic
programming that offers generic traversals and queries. Classically, support for generic
programming consists of two essential ingredients: a way to write (type-) overloaded
functions, and independently, a way to access the structure of data types. SYB seems to lack
the second. As a consequence, it is difficult to compare with other approaches such as PolyP
or Generic Haskell. In this paper we reveal the structural view that SYB builds upon. This …
Abstract
The paper “Scrap your boilerplate” (SYB) introduces a combinator library for generic programming that offers generic traversals and queries. Classically, support for generic programming consists of two essential ingredients: a way to write (type-)overloaded functions, and independently, a way to access the structure of data types. SYB seems to lack the second. As a consequence, it is difficult to compare with other approaches such as PolyP or Generic Haskell. In this paper we reveal the structural view that SYB builds upon. This allows us to define the combinators as generic functions in the classical sense. We explain the SYB approach in this changed setting from ground up, and use the understanding gained to relate it to other generic programming approaches. Furthermore, we show that the SYB view is applicable to a very large class of data types, including generalized algebraic data types.
Springer