Classes and Mixins

Date
1999
Journal Title
Journal ISSN
Volume Title
Publisher
Abstract

While class-based object-oriented programming languages provide a flexible mechanism for re-using and managing related pieces of code, they typically lack linguistic facilities for specifying a uniform extension of many classes with one set of fields and methods. As a result, programmers are unable to express certain abstractions over classes. In this paper we develop a model of class-to-class functions that we refer to as mixins. A mixin function maps a class to an extended class by adding or overriding fields and methods. Programming with mixins is similar to programming with single inheritance classes, but mixins more directly encourage programming to interfaces. The paper develops these ideas within the context of Java. The results are  an intuitive rewriting model of an essential Java subset; an extension that explains and models mixins; and type soundness theorems for these languages.

Description
Advisor
Degree
Type
Technical report
Keywords
Citation

Felleisen, Matthias, Flatt, Matthew and Krishnamurthi, Shriram. "Classes and Mixins." (1999) https://hdl.handle.net/1911/96475.

Has part(s)
Forms part of
Published Version
Rights
You are granted permission for the noncommercial reproduction, distribution, display, and performance of this technical report in any format, but this permission is only for a period of forty-five (45) days from the most recent time that you verified that this technical report is still available from the Computer Science Department of Rice University under terms that include this permission. All other rights are reserved by the author(s).
Link to license
Citable link to this page