home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / lang / ada / 2559 < prev    next >
Encoding:
Text File  |  1992-09-08  |  2.4 KB  |  52 lines

  1. Newsgroups: comp.lang.ada
  2. 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
  3. From: eachus@Dr_No.mitre.org (Robert I. Eachus)
  4. Subject: Re: MI - clutching at straws
  5. In-Reply-To: goodsenj@ajpo.sei.cmu.edu's message of Sat, 5 Sep 1992 06:55:04 GMT
  6. Message-ID: <EACHUS.92Sep8135021@Dr_No.mitre.org>
  7. Sender: news@linus.mitre.org (News Service)
  8. Nntp-Posting-Host: dr_no.mitre.org
  9. Organization: The Mitre Corp., Bedford, MA.
  10. References: <1992Sep5.065504.18997@sei.cmu.edu>
  11. Date: Tue, 8 Sep 1992 18:50:21 GMT
  12. Lines: 38
  13.  
  14. In article <1992Sep5.065504.18997@sei.cmu.edu> goodsenj@ajpo.sei.cmu.edu (John Goodsen) writes:
  15.  
  16.    >>A program which has objects which are simultanously in lists and trees, 
  17.    >>and uses MI to manage both structures is a mess.  Such a program can be 
  18.    >>created and made to work, but the list primitives will have to be aware 
  19.    >>of the tree primitives and vice-versa.
  20.  
  21.    > It's not very persuading to point out a poor design and then state 
  22.    > that the technology was the fault.
  23.  
  24.    I think you are agreeing with me, but the quote out of context
  25. seems to say something I didn't intend...
  26.  
  27.    A design which contains objects which are simultaneously in lists
  28. and trees is not inherently a bad design.  But if you need to do it,
  29. the programmer needs either to develop a set of higher level
  30. abstractions or pay attention to details when an object is say removed
  31. from a list.  (If the object is also an interior node in the tree, do
  32. you have to delete it from the tree first, or just remember its
  33. children and reinsert them? Is it legal to have objects that are in a
  34. list but not in a tree, or vice-versa? And so on.)  It can be done,
  35. BUT if list and tree primitives are separately inherited the
  36. programmer has to do most of the work.  A much better approach would
  37. be to use single inheritance from a tree type, and extend it with list
  38. primitives which are sensitive to the tree structure.  The progammer
  39. must still answer the same questions, but only in one place--the
  40. definition of the list type.
  41.  
  42.      So what I was really trying to say was that in this example it is
  43. dificult to compare relative advantages and disadvantages of different
  44. MI approaches, since any SI approach is so much cleaner.
  45. --
  46.  
  47.                     Robert I. Eachus
  48.  
  49. with STANDARD_DISCLAIMER;
  50. use  STANDARD_DISCLAIMER;
  51. function MESSAGE (TEXT: in CLEVER_IDEAS) return BETTER_IDEAS is...
  52.