From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b7bb302ee9d32439 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-10-20 11:07:33 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!hammer.uoregon.edu!skates!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: Q: Refactorizing code because Inheritance and Interfaces Date: 20 Oct 2003 14:57:35 -0400 Organization: NASA Goddard Space Flight Center (skates.gsfc.nasa.gov) Message-ID: References: <8lc761-u81.ln1@boavista.snafu.de> NNTP-Posting-Host: shevek.gsfc.nasa.gov Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: skates.gsfc.nasa.gov 1066672889 13047 128.183.235.101 (20 Oct 2003 18:01:29 GMT) X-Complaints-To: usenet@news.gsfc.nasa.gov NNTP-Posting-Date: 20 Oct 2003 18:01:29 GMT User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 Xref: archiver1.google.com comp.lang.ada:1220 Date: 2003-10-20T18:01:29+00:00 List-Id: Michael Erdmann writes: > In order to line up the implemenation of the XML_Reader with the > Abstract_Reader interface i need to rewrite the complete XML_Reader. > Is there any way to avoid such situations? In general, no. Refactoring is hard work. That's why it's worth doing :). > In java i would use constructs as implements Sax..,Abstract_Reader. Ada 200Y will have interface inheritance similar to Java's. But you still need to rewrite the implementation, so I don't see that as saving much work. You can get something similar to interface inheritance in Ada 95 using generic mixins. It depends on the details of what you are doing exactly what approach to take. -- -- Stephe