Skip to main content
Kent Academic Repository

Modular Generic Programming with Extensible Superclasses

Sulzmann, Martin and Wang, Meng (2006) Modular Generic Programming with Extensible Superclasses. In: Proceedings of the 2006 ACM SIGPLAN workshop on Generic programming. ACM, New York, USA, pp. 55-65. ISBN 1-59593-492-8. (doi:10.1145/1159861.1159869) (KAR id:47466)

Abstract

"Generics for the Masses" (GM) and "Scrap your Boilerplate" (SYB) are generic programming approaches based on some inenious applications of Haskell type classes. To achieve modularity, the GM and SYB approach have been extended by using some experimental language extensions such as abstraction over type classes and recursive instances. Hence, the type class encodings behind the GM and SYB approach become less practical and harder to understand.We show that none of these type class features are necessary if we use the single feature of extensible superclasses, the complement of subclass extension. We formalize type classes with extensible superclasses as the combination of a previously introduced type-passing translation scheme and a general type class framework. Our results shed some new light on the use of type classes to support generic programming.

Item Type: Book section
DOI/Identification number: 10.1145/1159861.1159869
Subjects: Q Science > QA Mathematics (inc Computing science) > QA 75 Electronic computers. Computer science
Q Science > QA Mathematics (inc Computing science) > QA 76 Software, computer programming,
Divisions: Divisions > Division of Computing, Engineering and Mathematical Sciences > School of Computing
Depositing User: Meng Wang
Date Deposited: 28 Feb 2015 15:50 UTC
Last Modified: 05 Nov 2024 10:31 UTC
Resource URI: https://kar.kent.ac.uk/id/eprint/47466 (The current URI for this page, for reference purposes)

University of Kent Author Information

Wang, Meng.

Creator's ORCID:
CReDIT Contributor Roles:
  • Depositors only (login required):

Total unique views for this document in KAR since July 2020. For more details click on the image.