This post is a set of notes on Bad Engineering Properties of Object-Oriented Languages" by Luca Cardelli, available at the time of writing from Cardelli’s site.
This post is mostly intended for my own notes. You may not find it useful.
First, Cardelli opens by defining 6 areas in which one can informally evaluate a language’s effectiveness for software engineering.
He then comments on some areas in which “advancements in procedural programming” have created positive changes in those six areas. Of particular note;
“In ML, accurate type information eliminates the need for nil-checking on pointer dereferencing”.
“… expereinced programmers adopt a coding style that causes some logical errors to show up as typechecking errors”
Cardelli then lists ways in which Object Oriented languages fail or score poorly on the metrics in question:
The first two points he lists, that object-oriented style is intrinsically less efficient and slower to compile, seem to be somewhat less relevant today than at the time of writing.
Cardelli argues that OO scores a “big win” in economy of small-scale development. Note that “The type systems of most object-oriented languages are not expressive enough.”
According to Cardelli, OO languages “have extremely poor modularity properties with respect to class extension and modification”. Note that another “large scale development problem” is the “confusion between classes and object types”, along with “the fact that subtype polymorphism is not good enough for expressing container classes”.
Cardelli then states where work is happening and what still needs to be done:
- “Subtyping and subclassing must be separated. Similarly, classes and interfaces must be separated”