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

  1. Xref: sparky comp.lang.ada:3216 comp.object:4155
  2. Path: sparky!uunet!charon.amdahl.com!pacbell.com!ames!agate!doc.ic.ac.uk!uknet!root44!hrc63!mrcu!paj
  3. From: paj@uk.co.gec-mrc (Paul Johnson)
  4. Newsgroups: comp.lang.ada,comp.object
  5. Subject: Re: OOD, Ada, and Inheritance
  6. Message-ID: <2169@snap>
  7. Date: 6 Nov 92 09:00:41 GMT
  8. References: <mmaccorm.47@fox.nstn.ns.ca>
  9. Reply-To: paj@uk.co.gec-mrc (Paul Johnson)
  10. Organization: GEC-Marconi Research Centre, Great Baddow, UK
  11. Lines: 26
  12.  
  13. In article <mmaccorm.47@fox.nstn.ns.ca> mmaccorm@fox.nstn.ns.ca (Mike Mac Cormack) writes:
  14. >If Ada software is being designed using OOA and OOD, should inheritance be 
  15. >avoided (or prohibited) in the design process, as Ada does not provide 
  16. >inheritance? 
  17.  
  18. Good question.  If no-one has any other questions then class is
  19. dismissed :-)
  20.  
  21. I recall that ADA's genericity system allows you to pass functions and
  22. procedures as parameters in a way reminiscent of the C function
  23. pointers (although ADA is type-safe).  I would look into the
  24. possibility of simulating inheritance by setting up structures of
  25. functions when objects are created.  You should be able to get single
  26. inheritance without too much trouble.  Maybe an ADA guru can suggest
  27. some details.
  28.  
  29. One system built in this way is the X Intrinsics library (Xt).  Its
  30. built in C, but the principle remains the same.  Take a look at it for
  31. an idea of what I mean.
  32.  
  33. Paul.
  34. -- 
  35. Paul Johnson (paj@gec-mrc.co.uk).        | Tel: +44 245 73331 ext 3245
  36. --------------------------------------------+----------------------------------
  37. These ideas and others like them can be had | GEC-Marconi Research is not
  38. for $0.02 each from any reputable idealist. | responsible for my opinions
  39.