home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.pascal
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!sdd.hp.com!ux1.cso.uiuc.edu!news.cso.uiuc.edu!alexia!cole
- From: cole@alexia.lis.uiuc.edu (Sandra Stewart-Cole)
- Subject: Re: INHERITED: what are the advantages
- References: <29505@oasys.dt.navy.mil>
- Message-ID: <C0pDCt.E3r@news.cso.uiuc.edu>
- Sender: usenet@news.cso.uiuc.edu (Net Noise owner)
- Organization: University of Illinois at Urbana
- Date: Mon, 11 Jan 1993 18:43:40 GMT
- Lines: 33
-
- In <29505@oasys.dt.navy.mil> roth@oasys.dt.navy.mil (Pete Roth) writes:
-
- >There's not much in the BP7 docs about using the reserved word
- >INHERITED, although it is used in place of all previously fully
- >qualified method invocations. For example, in place of
-
- >CONSTRUCTOR TDerived.Init ;
- > BEGIN
- > TBase.Init
- > ...
-
- >the new "example" is
-
- >CONSTRUCTOR TDerived.Init ;
- > BEGIN
- > INHERITED Init
- > ...
-
- >How is this new model an advantage?
-
- For one thing, it starts to converge with Apple's Object Pascal proposed
- standard...
-
- Beyond that, it allows one to change the inheritance structure to insert a new
- parent between a former parent and child without going back to change all the
- explicit parent calls. I can speak from the position of someone developing a
- cross-platform system in Think C (Mac) and Borland C (Windows/DOS) and I really
- wish that Borland C had the inherited feature, because we have had to insert
- classes, and as a result have had to go back thru some rather complex objects
- to change a lot of explicit parent calls. If we had been able to use the Think
- C inherited call, the insertion of a parent would have been much simpler.
-
- Bill Stewart-Cole
-