Object-oriented programming: an objective sense of style

Author:

Lieberherr K.1,Holland I.1,Riel A.1

Affiliation:

1. 161 Cullinane Hall, College of Computer Science, Northeastern University, 360 Huntington Ave., Boston MA

Abstract

We introduce a simple, programming language independent rule (known in-house as the Law of Demeter™) which encodes the ideas of encapsulation and modularity in an easy to follow form for the object-oriented programmer. You tend to get the following related benefits when you follow the Law of Demeter while minimizing simultaneously code duplication, the number of method arguments and the number of methods per class: Easier software maintenance, less coupling between your methods, better information hiding, narrower interfaces, methods which are easier to reuse, and easier correctness proofs using structural induction. We discuss two important interpretations of the Law (strong and weak) and we prove that any object-oriented program can be transformed to satisfy the Law. We express the Law in several languages which support object-oriented programming, including Flavors, Smalltalk-80, CLOS, C++ and Eiffel.

Publisher

Association for Computing Machinery (ACM)

Subject

Computer Graphics and Computer-Aided Design,Software

Reference17 articles.

1. D. Bobrow L. G. D. Michiel R. P. Gabriel S. E. Keene G. Kiczales and D. A. Moon. Common Lisp Object System Specification. March 1988 1988. Draft submitted to X3J13. D. Bobrow L. G. D. Michiel R. P. Gabriel S. E. Keene G. Kiczales and D. A. Moon. Common Lisp Object System Specification. March 1988 1988. Draft submitted to X3J13.

Cited by 26 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

1. Replication of a Study about the Impact of Method Chaining and Comments on Readability and Comprehension;2024 4th International Conference on Code Quality (ICCQ);2024-06-22

2. Architecture and System of E-Commerce;E-Commerce;2022

3. An Empirical Study of Method Chaining in Java;Proceedings of the 17th International Conference on Mining Software Repositories;2020-06-29

4. Exploring the Impact of Code Smells on Fine-Grained Structural Change-Proneness;International Journal of Software Engineering and Knowledge Engineering;2018-09-25

5. Recognising object-oriented software design quality: a practitioner-based questionnaire survey;Software Quality Journal;2017-04-17

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3