Welcome!
To use the personalized features of this site, please log in or register.
If you have forgotten your username or password, we can help.
|
 |
A Generic Programming Extension for Clean
| |
|
A Generic Programming Extension for Clean
Artem Alimarine6 and Rinus Plasmeijer6 
| (6) |
Nijmegen Institute for Information and Computing Sciences, 1 Toernooiveld, 6525ED Nijmegen, The Netherlands |
Abstract
Generic programming enables the programmer to define functions by induction on the structure of types. Defined once, such
a generic function can be used to generate a specialized function for any user defined data type. Several ways to support
generic programming in functional languages have been proposed, each with its own pros and cons. In this paper we describe
a combination of two existing approaches, which has the advantages of both of them. In our approach overloaded functions with
class variables of an arbitrary kind can be defined generically. A single generic definition defines a kind-indexed family
of overloaded functions, one for each kind. For instance, the generic mapping function generates an overloaded mapping function
for each kind.
Additionally, we propose a separate extension that allows to specify a customized instance of a generic function for a type
in terms of the generated instance for that type.
Fulltext Preview (Small, Large)
 References secured to subscribers.
|
|
|
|
|
|