Datatype Generic Programming In Java
Room: BBL. BBL 023
Speaker: Ingmar van der Steen
Title: Datatype Generic Programming in Java
The purpose of the study was to investigate if we could implement a
datatype-generic-programming (DGP) library in the OO language Java.
DGP is a form of programming in which functionality is written
only once and this functionality is reused for arbitrary classes.
A DG method captures the pattern that exists in ad-hoc implementations
of the same functionality for these classes. Being able to write a DG method
releases the burden of writing ad-hoc code for each individual class for
which we want to have this functionality.
Another aim was to find out if we could make this library modular and extensible.
Users of this library could then implement new DG methods and extend these methods in
a modular fashion.
In order to implement this library we tried to reuse the concepts of 'view' and
'runtime-type-representation' (RTR) from DGP libraries written in the functional programming language
Haskell. Our library intensively used the Java generics mechanism to be able to adopt these concepts and
be able to implement it in a modular and extensible way.
It was found that the concepts of 'view' and RTR also applied to an OO context.
We were able to implement a modular and extensible DGP library in the programming language Java
using the generics mechanism.