1995 · 84 citations · 19 references
ComputingComputer ScienceCompilersProgramming LanguagesSyntaxData TypesGeneric ProgrammingObject-oriented ProgrammingParameterizationProgramming Language DesignType SystemsExpressivenessModular ProgrammingParameterized TypesParametric PolymorphismSeparate CompilationSeparate Compilation SupportSubtype PolymorphismType Parameterization
All object-oriented languages provide support for subtype polymorphism, which allows the writing of generic code that works for families of related types. There is also a need, however, to write code that is generic across types that have no real family relationship. To satisfy this need a programming language must provide a mechanism for parametric polymorphism, allowing for types as parameters to routines and types. We show that to support modular programming and separate compilation there must be a mechanism for constraining the actual parameters of the routine or type. We describe a simple and powerful constraint mechanism and compare it with constraint mechanisms in other languages in terms of both ease of use and semantic expressiveness. We also discuss the interaction between subtype and parametric polymorphism: we discuss the subtype relations that can exist between instantiations of parameterized types, and which of those relations are useful and can be implemented efficiently. We illustrate our points using examples in Theta, a new object-oriented language, and we describe the time- and space-efficient implementation of parametric polymorphism used in Theta.
19
Barbara Liskov, Alan Snyder, Russell R. Atkinson et al. · Communications of the ACM · 1977 · 772 citations · Full text
A semantics of multiple inheritance
Luca Cardelli · Information and Computation · 1988 · 627 citations
Language Studies, World Languages, Knowledge Representation +7
Distrbution and Abstract Types in Emerald
Andrew P. Black, N.C. Hutchinson, Eric Jul et al. · IEEE Transactions on Software Engineering · 1987 · 409 citations
F-bounded polymorphism for object-oriented programming
Peter S. Canning, William R. Cook, Walter L. Hill et al. · 1989 · 330 citations