An object-oriented approach to datatype-generic programming

  • Authors:
  • Adriaan Moors;Frank Piessens;Wouter Joosen

  • Affiliations:
  • KU Leuven;KU Leuven;KU Leuven

  • Venue:
  • Proceedings of the 2006 ACM SIGPLAN workshop on Generic programming
  • Year:
  • 2006

Quantified Score

Hi-index 0.00

Visualization

Abstract

Datatype-generic programming (DGP) is the next step beyond abstracting over types using parametric polymorphism, which is often called "genericity" in object-oriented languages. However, unlike genericity, DGP has not received much attention in the OO community. Nonetheless, in the context of functional languages, it has proven to make programs more robust with respect to changes in the type structure, as well as in many other applications, such as type-safe XML processing and marshalling. To carry these strengths over to an OO language, we present an extensible library for lightweight DGP in Scala, based on an existing lightweight approach in Haskell. We discuss the challenges in developing and using our library, and explore ways to overcome them.