Unconstraining genericity
- 23 November 2002
- conference paper
- Published by Institute of Electrical and Electronics Engineers (IEEE)
Abstract
Generic classes and especially generic collection libraries can be of great benefit for efficient software production. Constrained genericity is used to guarantee that the type provided as a parameter to a generic class such as a sorted list will offer the methods that class requires. We argue that constrained genericity is not really the appropriate mechanism for this purpose since it restricts a generic class to one kind of use for each element type. We introduce the concept of 'generic procedure parameters' which allow the properties of a collection class to be specified in the instantiation rather than via the properties of the elements. We show that the concept is very efficiently implementable, more powerful than constrained genericity and more useful for the practical construction of complex data collections.Keywords
This publication has 13 references indexed in Scilit:
- Pizza into JavaPublished by Association for Computing Machinery (ACM) ,1997
- How well do inheritance mechanisms support inheritance concepts?Published by Springer Nature ,1997
- Lightweight parametric polymorphism for OberonPublished by Springer Nature ,1997
- Subtyping is not a good “match” for object-oriented languagesPublished by Springer Nature ,1997
- Integrating subtyping, matching and type quantification: A practical perspectivePublished by Springer Nature ,1996
- Subtypes vs. where clausesPublished by Association for Computing Machinery (ACM) ,1995
- Polymorphism and subtyping in interfaceACM SIGPLAN Notices, 1994
- Modula-3 language definitionACM SIGPLAN Notices, 1992
- A Proposal for Making Eiffel Type-safeThe Computer Journal, 1989
- F-bounded polymorphism for object-oriented programmingPublished by Association for Computing Machinery (ACM) ,1989