首页> 外文会议>ECOOP 2010 - Object-oriented technology programming >The Use of Overloading in Java Programs
【24h】

The Use of Overloading in Java Programs

机译:Java程序中重载的使用

获取原文
获取原文并翻译 | 示例

摘要

Method overloading is a controversial language feature, especially in the context of Object Oriented languages, where its interaction with overriding may lead to confusing semantics. One of the main arguments against overloading is that it can be abused by assigning the same identity to conceptually different methods. This paper describes a study of the actual use of overloading in JAVA. To this end, we developed a taxonomy of classification of the use of overloading, and applied it to a large JAVA corpus comprising more than 100,000 user defined types. We found that more than 14% of the methods in the corpus are overloaded. Using sampling and evaluation by human raters we found that about 60% of overloaded methods follow one of the "non ad hoc use of overloading patterns" and that additional 20% can be easily rewritten in this form. The most common pattern is the use of overloading as an emulation of default arguments, a mechanism which does not exist in JAVA.
机译:方法重载是一个有争议的语言功能,尤其是在面向对象的语言中,方法重载与覆盖的交互可能会导致语义混乱。防止重载的主要论据之一是,可以通过将相同的标识分配给概念上不同的方法来滥用重载。本文描述了对JAVA中重载实际使用的研究。为此,我们开发了重载使用分类的分类法,并将其应用于包含超过100,000个用户定义类型的大型JAVA语料库。我们发现,语料库中超过14%的方法被重载。通过使用人类评估者的抽样和评估,我们发现大约60%的重载方法遵循“非临时使用重载模式”之一,而另外20%的内容可以很容易地以这种形式重写。最常见的模式是使用重载作为默认参数的仿真,这是JAVA中不存在的一种机制。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号