Overloading and polymorphism in the interpretation of inheritance in C++

M. Buchanan

    Research output: Book/ReportOther report

    58 Downloads (Pure)

    Abstract

    The work described in this report was motivated by a desire to understand the implementation of inheritance in C++. In particular a paper by W.Harris entitled "Contravariance for the rest of us" had raised issues concerning the interpretation of overloading in inheritance. We wished to establish whether overloading in C++ is used to maintain the subtype relationship in the way that Harris suggests. Other work on contravariance has addressed the contravariance-covariance debate and C++ is interesting in that it permits neither contravariance nor covariance. This 'no-variance' policy was thought to be worth investigating in relation to subtyping. Before exploring C++, we explain the way in which we use the terms overloading and polymorphism and introduce the C++ concept of virtual functions. Our experiments are concerned with virtual functions since it is these functions which enable inheritance polymorphism to be realised and hence give C++ its object-oriented flavour.
    Original languageEnglish
    PublisherUniversity of Hertfordshire
    Publication statusPublished - 1994

    Publication series

    NameUH Computer Science Technical Report
    PublisherUniversity of Hertfordshire
    Volume202

    Fingerprint

    Dive into the research topics of 'Overloading and polymorphism in the interpretation of inheritance in C++'. Together they form a unique fingerprint.

    Cite this