Jump to content

Talk:Schizophrenia (object-oriented programming)

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by 96.237.189.238 (talk) at 02:07, 26 September 2011. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

The article uses a single reference to support the statement that delegation is inheritance "...some programming languages use delegation, which is semantically equivalent.", but then confuses the reader by describing how the semantics of delegation and inheritance differ (which is, ironically, the point of the whole article.

C2's page on this topic gives a more balanced discussion, including:

  • a link to at least one paper that refutes Stein's opinion.
  • a discussion of different viewpoints as to what delegation is.

The paper which is used as a counterexample to Stein's OOPSLA '87 paper is: "Automated Delegation is a Viable Alternative to Multiple Inheritance in Class Based Languages" [Viega, Reynolds and Behrends] http://www.cs.virginia.edu/~evans/cs655-S00/readings/viega.pdf

--

To be clear, what Stein's paper says is that delegation among prototypes is the same mechanism as inheritance among classes (NOT instances). This is spelled out more clearly in Lynn Andrea Stein, Henry Liberman, David Ungar: A shared view of sharing: The Treaty of Orlando. In: Won Kim, Frederick H. Lochovsky (Eds.): Object-Oriented Concepts, Databases, and Applications ACM Press, New York 1989, ch. 3, pp. 31-48 ISBN 0-201-14410-7 (online at Citeseer)

Stein's original paper does not say that the relationship among instances in a class-based language is the same as delegation (the relationship among certain instances in a prototype-based language such as self). Stein's paper is a refutation of Lieberman's claim that delegation is more powerful than (class-based) inheritance, NOT a claim that class-based and prototype-based instance relationships are the same. The Viega et al. paper does not refute Stein's central result; it explicitly reiterates it.

(The Lieberman paper claiming that delegation is more powerful than (class-based) inheritance is Henry Lieberman: Using prototypical objects to implement shared behavior in object-oriented systems. In: Conference proceedings on Object-oriented programming systems, languages and applications. Portland 1986, p. 214-223 ISSN 0362-1340 (Online at MIT Labs))