home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / lang / ada / 3275 < prev    next >
Encoding:
Internet Message Format  |  1992-11-14  |  3.8 KB

  1. Xref: sparky comp.lang.ada:3275 comp.object:4226
  2. Path: sparky!uunet!know!cass.ma02.bull.com!mips2!news.bbn.com!olivea!charnel!rat!usc!cs.utexas.edu!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!elephant.cis.ohio-state.edu!weide
  3. From: weide@elephant.cis.ohio-state.edu (Bruce Weide)
  4. Newsgroups: comp.lang.ada,comp.object
  5. Subject: Re: OOD, Ada, and Inheritance
  6. Message-ID: <1992Nov13.203723.26049@cis.ohio-state.edu>
  7. Date: 13 Nov 92 20:37:23 GMT
  8. References: <BxGpxt.FDw@cs.uiuc.edu> <1992Nov10.205810.5516@mcc.com> <1992Nov11.042043.9740@inmet.camb.inmet.com>
  9. Sender: news@cis.ohio-state.edu (NETnews        )
  10. Organization: The Ohio State University Dept. of Computer and Info. Science
  11. Lines: 62
  12.  
  13. In article <1992Nov11.042043.9740@inmet.camb.inmet.com>
  14. stt@spock.camb.inmet.com (Tucker Taft) writes:
  15. >
  16. >We also believe that object-oriented approaches are a natural
  17. >outgrowth of earlier work, in particular abstract-data-type (ADT)-oriented 
  18. >approaches.  The big thing that OO brings is robust support
  19. >for abstractions with *multiple* implementations.  Although the
  20. >concept of multiple implementations of a given abstract data type
  21. >was always discussed in academic circles, pre-OO languages with
  22. >abstract data types rarely had good support for multiple implementations.
  23. >
  24.  
  25. Good point about multiple implementations, but you don't need OO
  26. mechanisms like inheritance to get multiple implementations.  For
  27. example, the idea of multiple implementations is a central feature of
  28. RESOLVE, which has no OO features except a special kind of
  29. specification inheritance that has no bearing on multiple
  30. implementations.  In fact, it seems Ada could be extended with (direct
  31. language support for) multiple implementations, e.g., by permitting
  32. separate naming of package specs and bodies and a way of binding them
  33. together at instantiation time.  See a paper by M. Sitaraman in Proc.
  34. ICCL, Apr 1992, for some ideas on how this could be done.  Ada-9X
  35. doesn't seem to use this approach as I understand it.  Is there a
  36. problem because of some subtle Ada eccentricity that I'm not seeing?
  37.  
  38. Or, by multiple implementations, do you mean to insist on run-time
  39. selection among different implementations?  If so, what examples would
  40. you (e.g., Ralph, or others holding this view) consider to be "good"
  41. examples of the use of inheritance for this purpose; to be contrasted
  42. with Rosen's examples, which are criticized as unrepresentative of
  43. good OO practices?
  44.  
  45. >The only thing needed to ensure type safety
  46. >is that the operation exists with the given parameter profile;
  47. >the actual implementation of the operation need not be known (nor even
  48. >exist) at compile-time of the client of the operation.
  49. >
  50. >In other words, the big step from "type-oriented" to "object-oriented"
  51. >is not the concept of abstraction, but rather the concept that an
  52. >object identifies its own implementation; its compile-time-known
  53. >type only identifies its interface.
  54.  
  55. I'm sure I'm not telling anyone reading this anything they don't
  56. already know, but there's more to the interface than the parameter
  57. profile.  If you want to reason about how a client program is going to
  58. behave when you call some operation, you'd better have some
  59. implementation-independent specification of the abstract behavior of
  60. that operation.  Put another way, correct software involves a lot more
  61. than type-safety.  ALL the different implementations that might
  62. actually be invoked by a call must have the same abstract behavior, or
  63. you're going to have a hell of a time writing correct software (or at
  64. least convincing yourself that it is correct).
  65.  
  66. What abstract explanation of this behavior are you going to use, then?
  67. We could argue that this is not a language issue (at least not for an
  68. implementation language like Ada), but someone has to think about this
  69. problem before we can conclude which uses of inheritance are "good"
  70. and which are "bad" from a software engineering perspective.
  71.  
  72.  
  73. Cheers,
  74.     -Bruce
  75.