home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.ada
- Path: sparky!uunet!haven.umd.edu!darwin.sura.net!jvnc.net!yale.edu!qt.cs.utexas.edu!cs.utexas.edu!sun-barr!ames!agate!linus!linus.mitre.org!linus!mbunix!eachus
- From: eachus@Dr_No.mitre.org (Robert I. Eachus)
- Subject: Re: MI - clutching at straws
- In-Reply-To: goodsenj@ajpo.sei.cmu.edu's message of Sat, 5 Sep 1992 06:55:04 GMT
- Message-ID: <EACHUS.92Sep8135021@Dr_No.mitre.org>
- Sender: news@linus.mitre.org (News Service)
- Nntp-Posting-Host: dr_no.mitre.org
- Organization: The Mitre Corp., Bedford, MA.
- References: <1992Sep5.065504.18997@sei.cmu.edu>
- Date: Tue, 8 Sep 1992 18:50:21 GMT
- Lines: 38
-
- In article <1992Sep5.065504.18997@sei.cmu.edu> goodsenj@ajpo.sei.cmu.edu (John Goodsen) writes:
-
- >>A program which has objects which are simultanously in lists and trees,
- >>and uses MI to manage both structures is a mess. Such a program can be
- >>created and made to work, but the list primitives will have to be aware
- >>of the tree primitives and vice-versa.
-
- > It's not very persuading to point out a poor design and then state
- > that the technology was the fault.
-
- I think you are agreeing with me, but the quote out of context
- seems to say something I didn't intend...
-
- A design which contains objects which are simultaneously in lists
- and trees is not inherently a bad design. But if you need to do it,
- the programmer needs either to develop a set of higher level
- abstractions or pay attention to details when an object is say removed
- from a list. (If the object is also an interior node in the tree, do
- you have to delete it from the tree first, or just remember its
- children and reinsert them? Is it legal to have objects that are in a
- list but not in a tree, or vice-versa? And so on.) It can be done,
- BUT if list and tree primitives are separately inherited the
- programmer has to do most of the work. A much better approach would
- be to use single inheritance from a tree type, and extend it with list
- primitives which are sensitive to the tree structure. The progammer
- must still answer the same questions, but only in one place--the
- definition of the list type.
-
- So what I was really trying to say was that in this example it is
- dificult to compare relative advantages and disadvantages of different
- MI approaches, since any SI approach is so much cleaner.
- --
-
- Robert I. Eachus
-
- with STANDARD_DISCLAIMER;
- use STANDARD_DISCLAIMER;
- function MESSAGE (TEXT: in CLEVER_IDEAS) return BETTER_IDEAS is...
-