{"title":"Two constructions of C++ subclasses from functions","authors":"J. M. Bateman","doi":"10.1145/1122018.1122072","DOIUrl":null,"url":null,"abstract":"This work is about value-semantics of subclasses. Functions that are special reversible injections (1-to-1 functions) lead here to two subclass subconstructions in which functions control the values. We show by means of such functions that a subset or superset of the values of a class can become, in effect, its subclass. The constructions are exemplified in but not limited to C++. Taxonomic hierarchies based on is-a links [2] are usually presented as the purpose of subclasses [1]. A view of subclasses related to subtypes was presented in [3]. But one of our constructions is based neither on an is-a link nor on subtypes; it suggests there are alternative bases for hierarchies.","PeriodicalId":349974,"journal":{"name":"ACM-SE 33","volume":"1 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"1995-03-17","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"ACM-SE 33","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/1122018.1122072","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0
Abstract
This work is about value-semantics of subclasses. Functions that are special reversible injections (1-to-1 functions) lead here to two subclass subconstructions in which functions control the values. We show by means of such functions that a subset or superset of the values of a class can become, in effect, its subclass. The constructions are exemplified in but not limited to C++. Taxonomic hierarchies based on is-a links [2] are usually presented as the purpose of subclasses [1]. A view of subclasses related to subtypes was presented in [3]. But one of our constructions is based neither on an is-a link nor on subtypes; it suggests there are alternative bases for hierarchies.