基于类的语言中的类型安全动态对象委托

Lorenzo Bettini, V. Bono
{"title":"基于类的语言中的类型安全动态对象委托","authors":"Lorenzo Bettini, V. Bono","doi":"10.1145/1411732.1411756","DOIUrl":null,"url":null,"abstract":"Class inheritance and method overriding, as provided by standard class-based languages, are not flexible enough to represent the dynamic behavior of objects; with this respect, object composition and delegation are often advocated as a more flexible alternative to class inheritance since they act at run-time, thus permitting the behavior of objects to be specialized dynamically. In this paper we present Incomplete Featherweight Java (IFJ), an extension of Featherweight Java with incomplete objects, i.e., objects that require some missing methods which can be provided at run-time by composition with another (complete) object. The mechanism for method invocation is based on delegation and it is disciplined by static typing, therefore the language enjoys type safety (which implies no \"message-not-understood\" run-time errors) and avoids possible accidental overrides due to method clashes.","PeriodicalId":169989,"journal":{"name":"Principles and Practice of Programming in Java","volume":"370 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2008-09-09","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"9","resultStr":"{\"title\":\"Type safe dynamic object delegation in class-based languages\",\"authors\":\"Lorenzo Bettini, V. Bono\",\"doi\":\"10.1145/1411732.1411756\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Class inheritance and method overriding, as provided by standard class-based languages, are not flexible enough to represent the dynamic behavior of objects; with this respect, object composition and delegation are often advocated as a more flexible alternative to class inheritance since they act at run-time, thus permitting the behavior of objects to be specialized dynamically. In this paper we present Incomplete Featherweight Java (IFJ), an extension of Featherweight Java with incomplete objects, i.e., objects that require some missing methods which can be provided at run-time by composition with another (complete) object. The mechanism for method invocation is based on delegation and it is disciplined by static typing, therefore the language enjoys type safety (which implies no \\\"message-not-understood\\\" run-time errors) and avoids possible accidental overrides due to method clashes.\",\"PeriodicalId\":169989,\"journal\":{\"name\":\"Principles and Practice of Programming in Java\",\"volume\":\"370 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2008-09-09\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"9\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Principles and Practice of Programming in Java\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1145/1411732.1411756\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Principles and Practice of Programming in Java","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/1411732.1411756","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 9

摘要

标准的基于类的语言所提供的类继承和方法覆盖,在表示对象的动态行为方面不够灵活;在这方面,对象组合和委托通常被提倡为类继承的更灵活的替代方案,因为它们在运行时起作用,从而允许对象的行为动态特化。在本文中,我们介绍了不完整轻量级Java (IFJ),它是轻量级Java的一个扩展,具有不完整对象,即需要一些缺失方法的对象,这些方法可以通过与另一个(完整)对象的组合在运行时提供。方法调用的机制基于委托,并受静态类型的约束,因此该语言享有类型安全(这意味着没有“未理解的消息”运行时错误),并避免了由于方法冲突而可能发生的意外覆盖。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
Type safe dynamic object delegation in class-based languages
Class inheritance and method overriding, as provided by standard class-based languages, are not flexible enough to represent the dynamic behavior of objects; with this respect, object composition and delegation are often advocated as a more flexible alternative to class inheritance since they act at run-time, thus permitting the behavior of objects to be specialized dynamically. In this paper we present Incomplete Featherweight Java (IFJ), an extension of Featherweight Java with incomplete objects, i.e., objects that require some missing methods which can be provided at run-time by composition with another (complete) object. The mechanism for method invocation is based on delegation and it is disciplined by static typing, therefore the language enjoys type safety (which implies no "message-not-understood" run-time errors) and avoids possible accidental overrides due to method clashes.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信