On the use of type predicates in object-oriented software: the case of smalltalk

Oscar Callaú, R. Robbes, É. Tanter, David Röthlisberger, Alexandre Bergel
{"title":"On the use of type predicates in object-oriented software: the case of smalltalk","authors":"Oscar Callaú, R. Robbes, É. Tanter, David Röthlisberger, Alexandre Bergel","doi":"10.1145/2661088.2661091","DOIUrl":null,"url":null,"abstract":"Object-orientation relies on polymorphism to express behavioral variants. As opposed to traditional procedural design, explicit type-based conditionals should be avoided. This message is conveyed in introductory material on object orientation, as well as in object-oriented reengineering patterns. Is this principle followed in practice? In other words, are type predicates actually used in object-oriented software, and if so, to which extent? Answering these questions will assist practitioners and researchers with providing information about the state of the practice, and informing the active research program of retrofitting type systems, clarifying whether complex flow-sensitive typing approaches are necessary. Other areas, such as refactoring and teaching object orientation, can also benefit from empirical evidence on the matter. We report on a study of the use of type predicates in a large base of over 4 million lines of Smalltalk code. Our study shows that type predicates are in fact widely used to do explicit type dispatch, suggesting that flow-sensitive typing approaches are necessary for a type system retrofitted for a dynamic object-oriented language.","PeriodicalId":244838,"journal":{"name":"Proceedings of the 10th ACM Symposium on Dynamic languages","volume":"130 17 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2014-10-14","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"8","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 10th ACM Symposium on Dynamic languages","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/2661088.2661091","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 8

Abstract

Object-orientation relies on polymorphism to express behavioral variants. As opposed to traditional procedural design, explicit type-based conditionals should be avoided. This message is conveyed in introductory material on object orientation, as well as in object-oriented reengineering patterns. Is this principle followed in practice? In other words, are type predicates actually used in object-oriented software, and if so, to which extent? Answering these questions will assist practitioners and researchers with providing information about the state of the practice, and informing the active research program of retrofitting type systems, clarifying whether complex flow-sensitive typing approaches are necessary. Other areas, such as refactoring and teaching object orientation, can also benefit from empirical evidence on the matter. We report on a study of the use of type predicates in a large base of over 4 million lines of Smalltalk code. Our study shows that type predicates are in fact widely used to do explicit type dispatch, suggesting that flow-sensitive typing approaches are necessary for a type system retrofitted for a dynamic object-oriented language.
论面向对象软件中类型谓词的使用:以smalltalk为例
面向对象依赖于多态来表达行为变体。与传统的过程设计相反,应该避免显式的基于类型的条件。在面向对象的介绍性材料以及面向对象的再工程模式中都传达了这一信息。这一原则在实践中是否得到遵守?换句话说,类型谓词在面向对象软件中实际使用了吗?如果使用了,使用到什么程度?回答这些问题将有助于从业者和研究人员提供有关实践状态的信息,并为改造类型系统的积极研究计划提供信息,澄清复杂的流量敏感类型方法是否必要。其他领域,比如重构和面向对象教学,也可以从这个问题的经验证据中获益。我们报告了在超过400万行Smalltalk代码中使用类型谓词的一项研究。我们的研究表明,类型谓词实际上被广泛用于显式类型分派,这表明流敏感类型方法对于为动态面向对象语言而改进的类型系统是必要的。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
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学术文献互助群
群 号:481959085
Book学术官方微信