home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.object
- Path: sparky!uunet!rational.com!stripe!rmartin
- From: rmartin@stripe.Rational.COM (Bob Martin)
- Subject: Re: Non-Compatible Type Inheritance in Booch's Method?
- Message-ID: <rmartin.728091514@stripe>
- Sender: news@rational.com
- Organization: Rational
- References: <1993Jan21.084130.5007@dragon.acadiau.ca> <rmartin.727741373@thor> <1993Jan24.052355.16998@dragon.acadiau.ca>
- Date: Tue, 26 Jan 1993 23:38:34 GMT
- Lines: 39
-
- 880445p@dragon.acadiau.ca (Ravi Palepu) writes:
-
- |rmartin@thor.Rational.COM (Bob Martin) writes:
-
- |>protected forms.
-
- |> -----------> public inheritance
-
- |> --|--------> protected inheritance
-
- |> --||-------> private inheritance
-
- |>The old, "inherits (new type) relationship is now a private
- |>inheritance relationship. It indicates that the inheriting class does
- |>not conform to the ISA relationship. The public interface of the
- |>base class is not visible to clients of the subclass. Thus, the
- |>subclass is a new type, rather than a type which is compatible with
- |>the base class....
-
- |Is the 'new' notation becoming less general and more focused on C++?
- |Possibly, other types of inheritance can be mapped onto the three
- |described above. Smalltalk class inheritance can be mapped onto
- |protected inheritance (although it offers a lesser degree of encapsulation).
-
- Although some C++isms have been added to the notation, it is still
- very general and applicable to most OO languages.
-
- The inheritance used in Smalltalk is "public", i.e. the interface of
- the derived class is a superset of the interface of the base class.
- In private inheritance the interface of the derived class is unrelated
- to the interface of the base class. Thus it represents a new type,
- incompatible with the base. Moreover, object of the derived class
- cannot be directly converted into objects of the private base class...
-
- --
- Robert Martin | Design Consulting | Training courses offered:
- R. C. M. Consulting | rmartin@rational.com | Object Oriented Analysis
- 2080 Cranbrook Rd. | Tel: (708) 918-1004 | Object Oriented Design
- Green Oaks, Il 60048| Fax: (708) 918-1023 | C++
-