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

  1. Xref: sparky comp.lang.ada:3251 comp.object:4190
  2. Path: sparky!uunet!charon.amdahl.com!pacbell.com!decwrl!sun-barr!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!darwin.sura.net!spool.mu.edu!hri.com!noc.near.net!inmet!spock!stt
  3. From: stt@spock.camb.inmet.com (Tucker Taft)
  4. Newsgroups: comp.lang.ada,comp.object
  5. Subject: Re: OOD, Ada, and Inheritance
  6. Message-ID: <1992Nov11.042043.9740@inmet.camb.inmet.com>
  7. Date: 11 Nov 92 04:20:43 GMT
  8. References: <1992Nov9.145313.18741@cis.ohio-state.edu> <BxGpxt.FDw@cs.uiuc.edu> <1992Nov10.205810.5516@mcc.com>
  9. Sender: news@inmet.camb.inmet.com
  10. Organization: Intermetrics Inc, Cambridge MA
  11. Lines: 80
  12. Nntp-Posting-Host: spock
  13.  
  14. In article <1992Nov10.205810.5516@mcc.com> 
  15.  breland@cobweb.mcc.com (Mark Breland) writes:
  16.  
  17. >In article <BxGpxt.FDw@cs.uiuc.edu> johnson@cs.uiuc.edu (Ralph Johnson) writes:
  18. >>
  19. >>Just as serious a problem with Rosen's paper is the opinion that
  20. >>polymorphism is optional and can be done by hand when needed.  ...
  21. >>                           ...
  22. >>...  Rosen seemed to contradict himself when he
  23. >>talked about why Ada 9X wanted to add support for polymorphism, so
  24. >>perhaps he doesn't really believe this, but was just trying to explain
  25. >>why Ada was designed the way it was.  ...
  26. >
  27. >I saw no contradiction in Rosen's presentation of Ada 9X run-time
  28. >polymorphism.  Rather, it appeared to me he stressed the flexibility
  29. >of Ada 9X to allow *either* explicitly coded compile-time polymorphism
  30. >*or* dynamic binding through tagged types.  Either mechanism may apply,
  31. >at the whim of the initial designer.  See "Ada 9X: A Technical Summary"
  32. >by S. Tucker Taft, also in Comms. of the ACM Nov92, for a detailed
  33. >example of both paradigms.
  34.  
  35. Speaking for myself ;-), J. P. Rosen's views are somewhat different
  36. from those of the Ada 9X Mapping/Revision Team.  We do believe
  37. that inheritance with type extension and run-time polymorphism are
  38. important additional capabilities, and in fact are more type safe
  39. than the typical equivalent code based on variant records and
  40. case statements.  And of course, the dynamic binding inherent
  41. in run-time polymorphism opens up whole new ways of partitioning
  42. a system into independent subsystems while still retaining type safety.
  43. Since reusable and relatively independent subsystems are critical
  44. to the productive construction of large systems, dynamic binding (run-time
  45. polymorphism) is itself critical to this process.
  46.  
  47. And since most type-safe dynamic binding is based on the commonality
  48. ensured through the rules of inheritance (at least of interface), 
  49. the two are inseparable in most OOPLs.
  50.  
  51. >>. . . (Or inheritance is an addition to composition,
  52. >>since composition was first.)
  53. >
  54. >Thank you for stating the above...that's the first time I have heard a
  55. >staunch OO persona give credit to the evolution of object-oriented
  56. >methods, rather than describe it as a radically new invention.
  57.  
  58. We also believe that object-oriented approaches are a natural
  59. outgrowth of earlier work, in particular abstract-data-type (ADT)-oriented 
  60. approaches.  The big thing that OO brings is robust support
  61. for abstractions with *multiple* implementations.  Although the
  62. concept of multiple implementations of a given abstract data type
  63. was always discussed in academic circles, pre-OO languages with
  64. abstract data types rarely had good support for multiple implementations.
  65.  
  66. Inheritance and run-time polymorphism make multiple implementations
  67. for a given abstraction practical and workable, allowing code
  68. to be written that works on any derivative of a given type just
  69. as well as it works on the original "root" type of the hierarchy.
  70. The "trick" is that each object carries enough information to identify
  71. its own particular implementation, allowing automatic run-time dispatch
  72. to the "appropriate" implementation of any given "primitive" operation
  73. of the abstraction.  The only thing needed to ensure type safety
  74. is that the operation exists with the given parameter profile;
  75. the actual implementation of the operation need not be known (nor even
  76. exist) at compile-time of the client of the operation.
  77.  
  78. In other words, the big step from "type-oriented" to "object-oriented"
  79. is not the concept of abstraction, but rather the concept that an
  80. object identifies its own implementation; its compile-time-known
  81. type only identifies its interface.
  82.  
  83. >~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  84. >  Mark A. Breland             |    Microelectronics and Computer
  85. >  Project Leader - AFT        |    Technology Corporation 
  86. >  (512) 338-3509              |    3500 West Balcones Drive
  87. >  breland@mcc.com             |    Austin, Texas 78759-6509
  88. >~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  89.  
  90. S. Tucker Taft     stt@inmet.com
  91. Ada 9X Mapping/Revision Team
  92. Intermetrics, Inc.
  93. Cambridge, MA  02138
  94.