home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / lang / pascal / 8044 < prev    next >
Encoding:
Text File  |  1993-01-11  |  1.6 KB  |  45 lines

  1. Newsgroups: comp.lang.pascal
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!sdd.hp.com!ux1.cso.uiuc.edu!news.cso.uiuc.edu!alexia!cole
  3. From: cole@alexia.lis.uiuc.edu (Sandra Stewart-Cole)
  4. Subject: Re: INHERITED: what are the advantages
  5. References: <29505@oasys.dt.navy.mil>
  6. Message-ID: <C0pDCt.E3r@news.cso.uiuc.edu>
  7. Sender: usenet@news.cso.uiuc.edu (Net Noise owner)
  8. Organization: University of Illinois at Urbana
  9. Date: Mon, 11 Jan 1993 18:43:40 GMT
  10. Lines: 33
  11.  
  12. In <29505@oasys.dt.navy.mil> roth@oasys.dt.navy.mil (Pete Roth) writes:
  13.  
  14. >There's not much in the BP7 docs about using the reserved word
  15. >INHERITED, although it is used in place of all previously fully
  16. >qualified method invocations. For example, in place of
  17.  
  18. >CONSTRUCTOR TDerived.Init ;
  19. > BEGIN
  20. >   TBase.Init
  21. >   ...
  22.  
  23. >the new "example" is
  24.  
  25. >CONSTRUCTOR TDerived.Init ;
  26. > BEGIN
  27. >   INHERITED Init
  28. >   ...
  29.  
  30. >How is this new model an advantage?
  31.  
  32. For one thing, it starts to converge with Apple's Object Pascal proposed 
  33. standard... 
  34.  
  35. Beyond that, it allows one to change the inheritance structure to insert a new
  36. parent between a former parent and child without going back to change all the 
  37. explicit parent calls. I can speak from the position of someone developing a 
  38. cross-platform system in Think C (Mac) and Borland C (Windows/DOS) and I really
  39. wish that Borland C had the inherited feature, because we have had to insert 
  40. classes, and as a result have had to go back thru some rather complex objects 
  41. to change a lot of explicit parent calls. If we had been able to use the Think
  42. C inherited call, the insertion of a parent would have been much simpler.
  43.  
  44. Bill Stewart-Cole
  45.