Genericity versus inheritance

@inproceedings{Meyer1986GenericityVI,
  title={Genericity versus inheritance},
  author={Bertrand Meyer},
  booktitle={OOPLSA '86},
  year={1986}
}
  • B. Meyer
  • Published in OOPLSA '86 1 November 1986
  • Computer Science
Genericity, as in Ada or ML, and inheritance, as in object-oriented languages, are two alternative techniques for ensuring better extendibility, reusability and compatibility of software components. This article is a comparative analysis of these two methods. It studies their similarities and differences and assesses to what extent each may be simulated in a language offering only the other. It shows what features are needed to successfully combine the two approaches in a statically typed… 

Figures from this paper

What Programmers Do with Inheritance in Java

An empirical study of 93 open-source Java software systems, supplemented by longitudinal analyses of 43 versions of two systems, finds inheritance is used for two main reasons: to support subtyping and to permit what the authors call external code reuse.

Genericity in Java with Virtual Types

This paper suggests virtual types for Java, a language mechanism which subsumes parameterized classes, while also integrating more naturally with Java's object model. The same basic mechanism is also

Genericity versus inheritance reconsidered: self-reference using generics

If the authors focus on the use of inheritance as an implementation technique, its key feature is the dynamic binding of self-referential operation calls, and this turns out to be basically a parameterization mechanism that can in fact be simulated using generics and static binding.

Unifying Genericity - Combining the Benefits of Virtual Types and Parameterized Classes

This paper presents a mechanism for describing generic classes: structural virtual types, essentially a merger of parameterized classes and virtual types and includes the bene fits of both, in particular retaining mutual recursion and covariance of virtual types as well as the function-like nature of parameterize classes.

Structured Inheritance for Algebraic Class Specifications

It is proposed mechanisms to derive inherited classes whose behavior can be described in a clean way in terms of the behavior of the superclasses, and a formalization of the intuitive notion of subtyping is related to the stronger inheritance.

An Algebraic View of Inheritance and Subtyping in Object Oriented Programming

In Object Oriented Programming the powerful mechanism of inheritance allows the definition of classes starting from variables and methods of another class previously defined. Inheritance can be

Conformance, Genericity, Inheritance and Enhancement

A recent paper by Meyer compared the usefulness of Genericity and Inheritance as a basis for static type checking in object oriented systems with that of Conformance, and this paper is reexamined here using Conformance.

Object-oriented programming in Ada83—genericity rehabilitated

A scheme for single-inheritance object-oriented programming in Ada83 is presented in which methods are determined at compile time using "generic" subprogram overloading, which calls into question Bertrand Meyer's conclusions regarding the weakness of generic units.

Object-oriented programming in Smalltalk and ADA

This comparison highlights the strengths and weaknesses of both types of languages from an object-oriented perspective and provides a basis for the application of experience from Smalltalk and other object- oriented languages to increasingly widely used modular languages such as Ada and Modula-2.

Inheritance and reusability

  • E. TemperoR. Biddle
  • Computer Science
    Proceedings 1998 Australian Software Engineering Conference (Cat. No.98EX233)
  • 1998
It is shown that inheritance does support reusability, but does so in ways that are not well understood, and that this lack of success is due not to any particular shortcoming in inheritance, but to widespread misunderstanding of the way the technology supportsReusability.
...

References

SHOWING 1-10 OF 31 REFERENCES

On understanding types, data abstraction, and polymorphism

A λ-calculus-based model for type systems that allows us to explore the interaction among the concepts of type, data abstraction, and polymorphism in a simple setting, unencumbered by complexities of production programming languages is developed.

A Theory of Type Polymorphism in Programming

  • R. Milner
  • Computer Science
    J. Comput. Syst. Sci.
  • 1978

A Specification Language

This paper gives an informal presentation of the language currently used at the Programming Research Group, an extension of conventional set theoretical notation, that has been shown to meet the aim of providing a uniform notation and a formal framework for reasoning and proving properties about computer systems.

Eiffel: programming for reusability and extendibility

The language is based on the principles of object-oriented design, augmented by features enhancing correctness, extendibility and efficiency; the environment includes a basic class library and tools for such tasks as automatic configuration management, documentation and debugging.

Basic Polymorphic Typechecking

Principles of OBJ2

Four clsssrs of design principles for 01352 ate discussed briefly in this inttoduct, and then in mote detail brlnw: motlulntizntion and patnmcteriantion; (2) subsorts; (3) implcmcntnt; and (4) inlrtaction and flexibility.

Specification Language

The proposed language takes its inspiration from the effort made within the last fifty years to present mathematical works in a satisfactory way, using a strict formalism inherited from mathematics practice recognising the set theory as a sound basis for the formalisation necessity of strong structuring of the formal text.

CLU Reference Manual

This document serves both as an introduction to CLU and as a language reference manual that describes each aspect of CLU in detail, and discusses the proper use of various features.

Krypton: A Functional Approach to Knowledge Representation

The authors have developed a design strategy for avoiding these types of problems and have implemented a representation system based on it, called Krypton, which clearly distinguishes between definitional and factual information.

What IS-A Is and Isn't: An Analysis of Taxonomic Links in Semantic Networks

In this article* the more common interpretations of IS-A are cataloged and some differences between systems that, on the surface, appear very similar are pointed out.