Abstract

The language-independent Law of Demeter, which encodes the ideas of encapsulation and modularity in an easy-to-follow form for object-oriented programmers, is presented. The law was developed during the design and implementation of the Demeter system, which provides a high-level interface to class-based, object-oriented systems. Two forms of the law, the class and object forms, are described. Its motivation is to ensure that the software is as modular as possible. Principles covered by the law include coupling control, information hiding, information restriction, information localization, and structured induction. An example is given to show how the law is applied, and valid violations are identified. It is shown how to transform a method that does not satisfy the law into one that does.< <ETX xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">&gt;</ETX>

Keywords

Encapsulation (networking)Computer scienceModular designModularity (biology)Object-oriented programmingClass (philosophy)Object (grammar)Programming languageObject-oriented designSoftwareSoftware engineeringTheoretical computer scienceArtificial intelligenceComputer security

Affiliated Institutions

Related Publications

Object-oriented programming with flavors

This paper describes Symbolics' newly redesigned object-oriented programming system, Flavors. Flavors encourages program modularity, eases the development of large, complex prog...

1986 ACM SIGPLAN Notices 302 citations

Object-oriented programming with flavors

This paper describes Symbolics' newly redesigned object-oriented programming system, Flavors. Flavors encourages program modularity, eases the development of large, complex prog...

1986 Conference proceedings on Object-orie... 198 citations

From data properties to evidence

The problem of making decisions among propositions based on both uncertain data items and arguments which are not certain is addressed. The primary knowledge discovery issue add...

1993 IEEE Transactions on Knowledge and Da... 32 citations

Publication Info

Year
1989
Type
article
Volume
6
Issue
5
Pages
38-48
Citations
226
Access
Closed

External Links

Social Impact

Social media, news, blog, policy document mentions

Citation Metrics

226
OpenAlex

Cite This

Karl Lieberherr, Ian M. Holland (1989). Assuring good style for object-oriented programs. IEEE Software , 6 (5) , 38-48. https://doi.org/10.1109/52.35588

Identifiers

DOI
10.1109/52.35588