home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / object / 5061 < prev    next >
Encoding:
Text File  |  1993-01-27  |  2.1 KB  |  51 lines

  1. Newsgroups: comp.object
  2. Path: sparky!uunet!rational.com!stripe!rmartin
  3. From: rmartin@stripe.Rational.COM (Bob Martin)
  4. Subject: Re: Non-Compatible Type Inheritance in Booch's Method?
  5. Message-ID: <rmartin.728091514@stripe>
  6. Sender: news@rational.com
  7. Organization: Rational
  8. References: <1993Jan21.084130.5007@dragon.acadiau.ca> <rmartin.727741373@thor> <1993Jan24.052355.16998@dragon.acadiau.ca>
  9. Date: Tue, 26 Jan 1993 23:38:34 GMT
  10. Lines: 39
  11.  
  12. 880445p@dragon.acadiau.ca (Ravi Palepu) writes:
  13.  
  14. |rmartin@thor.Rational.COM (Bob Martin) writes:
  15.  
  16. |>protected forms.
  17.  
  18. |>        -----------> public inheritance
  19.  
  20. |>        --|--------> protected inheritance
  21.  
  22. |>        --||-------> private inheritance
  23.  
  24. |>The old, "inherits (new type) relationship is now a private
  25. |>inheritance relationship.  It indicates that the inheriting class does
  26. |>not conform to the ISA relationship.  The public interface of the
  27. |>base class is not visible to clients of the subclass.  Thus, the
  28. |>subclass is a new type, rather than a type which is compatible with
  29. |>the base class....
  30.  
  31. |Is the 'new' notation becoming less general and more focused on C++?
  32. |Possibly, other types of inheritance can be mapped onto the three
  33. |described above. Smalltalk class inheritance can be mapped onto
  34. |protected inheritance (although it offers a lesser degree of encapsulation).
  35.  
  36. Although some C++isms have been added to the notation, it is still
  37. very general and applicable to most OO languages.
  38.  
  39. The inheritance used in Smalltalk is "public", i.e. the interface of
  40. the derived class is a superset of the interface of the base class.
  41. In private inheritance the interface of the derived class is unrelated
  42. to the interface of the base class.  Thus it represents a new type,
  43. incompatible with the base.  Moreover, object of the derived class
  44. cannot be directly converted into objects of the private base class...
  45.  
  46. --
  47. Robert Martin       | Design Consulting    | Training courses offered:
  48. R. C. M. Consulting | rmartin@rational.com |  Object Oriented Analysis
  49. 2080 Cranbrook Rd.  | Tel: (708) 918-1004  |  Object Oriented Design
  50. Green Oaks, Il 60048| Fax: (708) 918-1023  |  C++
  51.